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:22:45 +0000 (11:22 +0100)
commit4e106709060f2bc8f2b971e7915510d6de1e139a
tree2dff5ec97bbe9113f5894b0a404d626886f08ea0
parent7b5d7880019cc03457728ce8969be4aad7771297
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