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

commit dbcea7615d8d7d58f6ff49d2c5568113f70effe9 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, indentation]
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
drivers/usb/serial/spcp8x5.c