Thread (3 messages) 3 messages, 2 authors, 2020-11-04

Re: [PATCH] USB: serial: digi_acceleport: fix write-wakeup deadlocks

From: Johan Hovold <johan@kernel.org>
Date: 2020-11-04 10:14:29
Also in: stable

On Wed, Oct 28, 2020 at 10:38:18AM +0100, Greg Kroah-Hartman wrote:
On Mon, Oct 26, 2020 at 11:43:06AM +0100, Johan Hovold wrote:
quoted
The driver must not call tty_wakeup() while holding its private lock as
line disciplines are allowed to call back into write() from
write_wakeup(), leading to a deadlock.

Also remove the unneeded work struct that was used to defer wakeup in
order to work around a possible race in ancient times (see comment about
n_tty write_chan() in commit 14b54e39b412 ("USB: serial: remove
changelogs and old todo entries")).

Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
Cc: stable@vger.kernel.org
Signed-off-by: Johan Hovold <johan@kernel.org>
---
 drivers/usb/serial/digi_acceleport.c | 45 ++++++++--------------------
 1 file changed, 13 insertions(+), 32 deletions(-)
Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Thanks for the review. Applied for -next along with the cleanup patch.

Johan
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help