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

commit 356050d8b1e526db093e9d2c78daf49d6bf418e3 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.

Also remove bogus test for private data pointer being NULL as it is
never assigned in the loop.

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/cypress_m8.c