]> git.karo-electronics.de Git - karo-tx-linux.git/commit
USB: mos7840: fix use-after-free in TIOCMIWAIT
authorJohan Hovold <jhovold@gmail.com>
Tue, 19 Mar 2013 08:21:20 +0000 (09:21 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 5 Apr 2013 16:26:04 +0000 (09:26 -0700)
commita3b65d54d0ffaa35242ab8a7c83d3f131b3994a3
tree977c97d0f8dc7d48c5dc7b30fbfa9c4fb6a84c47
parent281e3d62958d6f53cc1b40b8949374ab0030a9af
USB: mos7840: fix use-after-free in TIOCMIWAIT

commit a14430db686b8e459e1cf070a6ecf391515c9ab9 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>
drivers/usb/serial/mos7840.c