]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
USB: ch341: fix use-after-free in TIOCMIWAIT
authorJohan Hovold <jhovold@gmail.com>
Tue, 19 Mar 2013 08:21:12 +0000 (09:21 +0100)
committerBen Hutchings <ben@decadent.org.uk>
Thu, 25 Apr 2013 19:25:26 +0000 (20:25 +0100)
commitd14eeaffa77b092812af5868f9bfed2c6502d786
treecbdcb98b03848556ae4ed359c291cea6b041f6f4
parent923ab36b14cb557482a079b0d67ef80f90bbc410
USB: ch341: fix use-after-free in TIOCMIWAIT

commit fa1e11d5231c001c80a479160b5832933c5d35fb upstream.

Use the port wait queue and make sure to check the serial disconnected
flag before accessing private port data after waking up.

This is is needed as the private port data (including the wait queue
itself) can be gone when waking up after a disconnect.

Signed-off-by: Johan Hovold <jhovold@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
drivers/usb/serial/ch341.c