USB: serial: keyspan_pda: fix write deadlock
authorJohan Hovold <johan@kernel.org>
Sun, 25 Oct 2020 17:45:48 +0000 (18:45 +0100)
committerJohan Hovold <johan@kernel.org>
Wed, 4 Nov 2020 10:01:08 +0000 (11:01 +0100)
commit7353cad7ee4deaefc16e94727e69285563e219f6
treeec988e47ed724ba1961112b6efdff04c7e308e59
parent696c541c8c6cfa05d65aa24ae2b9e720fc01766e
USB: serial: keyspan_pda: fix write deadlock

The write() callback can be called in interrupt context (e.g. when used
as a console) so interrupts must be disabled while holding the port lock
to prevent a possible deadlock.

Fixes: e81ee637e4ae ("usb-serial: possible irq lock inversion (PPP vs. usb/serial)")
Fixes: 507ca9bc0476 ("[PATCH] USB: add ability for usb-serial drivers to determine if their write urb is currently being used.")
Cc: stable <stable@vger.kernel.org> # 2.6.19
Acked-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Johan Hovold <johan@kernel.org>
drivers/usb/serial/keyspan_pda.c