linux-serial.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* hci_ldsic nested locking problem
@ 2014-03-20 16:34 Felipe Balbi
       [not found] ` <20140320163435.GH32692-HgARHv6XitL9zxVx7UNMDg@public.gmane.org>
  0 siblings, 1 reply; 16+ messages in thread
From: Felipe Balbi @ 2014-03-20 16:34 UTC (permalink / raw)
  To: Marcel Holtmann, Alan Cox, Greg KH
  Cc: Muralidharan Karicheri, linux-bluetooth, linux-serial,
	Linux Kernel Mailing List

[-- Attachment #1: Type: text/plain, Size: 564 bytes --]

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

-- 
balbi

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2014-03-20 19:25 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-03-20 16:34 hci_ldsic nested locking problem Felipe Balbi
     [not found] ` <20140320163435.GH32692-HgARHv6XitL9zxVx7UNMDg@public.gmane.org>
2014-03-20 16:42   ` Alan Cox
     [not found]     ` <1395333736.22077.32.camel-wU3TRTJX3O1FGiH78xh5akvbDziVy8sZEvhb3Hwu1Ks@public.gmane.org>
2014-03-20 17:16       ` Felipe Balbi
2014-03-20 17:29         ` Felipe Balbi
2014-03-20 17:34           ` Peter Hurley
2014-03-20 17:35             ` Felipe Balbi
     [not found]               ` <20140320173518.GD2827-HgARHv6XitL9zxVx7UNMDg@public.gmane.org>
2014-03-20 18:45                 ` Greg KH
2014-03-20 18:54                   ` Peter Hurley
2014-03-20 17:31         ` Peter Hurley
     [not found]           ` <532B25FC.3070408-WaGBZJeGNqdsbIuE7sb01tBPR1lH4CV8@public.gmane.org>
2014-03-20 18:11             ` Felipe Balbi
2014-03-20 18:21               ` Peter Hurley
2014-03-20 18:25                 ` Felipe Balbi
2014-03-20 19:01                   ` Felipe Balbi
2014-03-20 19:03                     ` Felipe Balbi
2014-03-20 19:16                   ` Peter Hurley
2014-03-20 19:25                     ` Felipe Balbi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).