]> git.baikalelectronics.ru Git - kernel.git/commit
USB: quatech2: fix use-after-free in TIOCMIWAIT
authorJohan Hovold <jhovold@gmail.com>
Tue, 19 Mar 2013 08:21:23 +0000 (09:21 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 21 Mar 2013 22:59:05 +0000 (15:59 -0700)
commitebcebc239440298b94e09d7581640a9358efc99e
tree51f4e310d5db5cd0bc727a2554f7c90bcba22c6c
parent981059d3e1b2e3fe472c6de11d44d3e0fecc7573
USB: quatech2: fix use-after-free in TIOCMIWAIT

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.

Cc: stable <stable@vger.kernel.org>
Signed-off-by: Johan Hovold <jhovold@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/serial/quatech2.c