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

commit cf1d24443677a0758cfa88ca40f24858b89261c0 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>
[bwh: Backported to 3.2: adjust context]
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
drivers/usb/serial/mct_u232.c