OSDN Git Service

USB: serial: quatech2: fix sleep-while-atomic in close
authorJohan Hovold <johan@kernel.org>
Tue, 3 Jan 2017 15:40:01 +0000 (16:40 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 12 Jan 2017 10:39:13 +0000 (11:39 +0100)
commit2a4ae7bc3d8d8e4b92dbac37c90ba1708e7e5c80
treee4df2a5b3cfa29e17b822263560a9c1afd51230e
parent6ae3e89aa6b1cc3ae129922c7132ffea0aa6b19c
USB: serial: quatech2: fix sleep-while-atomic in close

commit f09d1886a41e9063b43da493ef0e845ac8afd2fa upstream.

The write URB was being killed using the synchronous interface while
holding a spin lock in close().

Simply drop the lock and busy-flag update, something which would have
been taken care of by the completion handler if the URB was in flight.

Fixes: f7a33e608d9a ("USB: serial: add quatech2 usb to serial driver")
Signed-off-by: Johan Hovold <johan@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/serial/quatech2.c