USB: ark3116: fix use-after-free in TIOCMIWAIT
commitffc687e350fa607e42c8c7b44e198f39265c6ad9
authorJohan Hovold <jhovold@gmail.com>
Tue, 19 Mar 2013 08:21:11 +0000 (19 09:21 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 14 Apr 2014 13:44:23 +0000 (14 06:44 -0700)
tree91978a0314a5a5e541b03ed51a4598e8ec93d4b3
parent017f42518a72858f4332572a963be4212e0ee795
USB: ark3116: fix use-after-free in TIOCMIWAIT

commit 5018860321dc7a9e50a75d5f319bc981298fb5b7 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: Ben Hutchings <ben@decadent.org.uk>
Cc: Yang Yingliang <yangyingliang@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/serial/ark3116.c