]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
bluetooth: hci_ldisc: fix deadlock condition
authorFelipe Balbi <balbi@ti.com>
Wed, 23 Apr 2014 14:58:26 +0000 (09:58 -0500)
committerZefan Li <lizefan@huawei.com>
Mon, 1 Dec 2014 10:02:42 +0000 (18:02 +0800)
commitae552f6b54840fc7fb7a7ee688632b55e7eb9cef
tree15a41fb40bde267fc8ebddc02797b932c1efa44c
parent2f1eef27008bd0abf9879e51a74fb9d0418634e8
bluetooth: hci_ldisc: fix deadlock condition

commit da64c27d3c93ee9f89956b9de86c4127eb244494 upstream.

LDISCs shouldn't call tty->ops->write() from within
->write_wakeup().

->write_wakeup() is called with port lock taken and
IRQs disabled, tty->ops->write() will try to acquire
the same port lock and we will deadlock.

Acked-by: Marcel Holtmann <marcel@holtmann.org>
Reviewed-by: Peter Hurley <peter@hurleysoftware.com>
Reported-by: Huang Shijie <b32955@freescale.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Tested-by: Andreas Bießmann <andreas@biessmann.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
[tim.niemeyer@corscience.de: rebased on 3.4.103]
Signed-off-by: Tim Niemeyer <tim.niemeyer@corscience.de>
Signed-off-by: Zefan Li <lizefan@huawei.com>
drivers/bluetooth/hci_ldisc.c
drivers/bluetooth/hci_uart.h