Return-Path: Date: Thu, 20 Mar 2014 11:34:35 -0500 From: Felipe Balbi To: Marcel Holtmann , Alan Cox , Greg KH CC: Muralidharan Karicheri , , , Linux Kernel Mailing List Subject: hci_ldsic nested locking problem Message-ID: <20140320163435.GH32692@saruman.home> Reply-To: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="RwGu8mu1E+uYXPWP" List-ID: --RwGu8mu1E+uYXPWP Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi, when 8250 driver calls uart_write_wakeup(), the tty port lock is already taken. hci_ldisc.c's implementation of ->write_wakeup() calls tty->ops->write() to actually send the characters, but that call will try to acquire the same port lock again. Looking at other line disciplines that looks like a bug in hci_ldisc.c. Am I correct to assume that ->write_wakeup() is supposed to *just* wakeup the bottom half so we handle ->write() in another context ? Is it legal to call tty->ops->write() from within ->write_wakeup() ? cheers --=20 balbi --RwGu8mu1E+uYXPWP Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBAgAGBQJTKxibAAoJEIaOsuA1yqREQ6wP/Rki7213nleViEF4e2iQPoiX Phn2KyCf70Mbly1abtLR9ilIqs4iebRg+VOowU2/64d6+SiiOzPupDlJRIrikHvR BT4gZB7YTQiUgYteO21vlIEKUBxRTr8ntujA6p+v0NOZqJv/BNcLcGuR8e774+fe j97ZcFlx+hbEb9q608bD5XbkGXftXBhhFx+llbM5AAK/ffDzFwwp9EgYzjSO4M0I lpIInSuT7NvOShU63Jx642D5BG2n1F5A6NgZacKGhXIC0FSJjHPN6eo1vNYPcqGe ubM8MgF/RbDrqJS7c0BRnr3qFvYah0NYeS0sEkWKcTlmXK8JX8fIXw+7+e49WaE1 fc2ccmfJWfNneB1/kRfTZgt3Pxi6iwS2GzMrXKEelpI2BLrnhpm2Ew5TQmMaIfw3 WLySiAtZG6zWuqxHzbAOUu8vMdH+NRxFRvTUhYXiSSJhUxQIrYL2IeOG3vecTkYQ 4bRXLnK0OOCPPKC95IA3RyFP26rb4uMOYU+t/lbU5OD24L0mzwFAGl7i8AfoYTAy s3BywhZA5joQTqDKXDVQ9agz4VmiIG5tLcp1WPEMXRwS6/BRM/DI4oRRfKfjKpLB jLcGurJjdt04I7irLBMksVdMPqMRWn3b3ZgEGlJffEcxC4V9r2IPH8Pi9C4ccKTH 17CbvpZMUjSUZoDkbPZT =eLjS -----END PGP SIGNATURE----- --RwGu8mu1E+uYXPWP--