]> git.baikalelectronics.ru Git - kernel.git/commit
USB: serial: opticon: fix control-message timeouts
authorJohan Hovold <johan@kernel.org>
Mon, 13 Jan 2020 17:22:13 +0000 (18:22 +0100)
committerJohan Hovold <johan@kernel.org>
Tue, 14 Jan 2020 11:05:44 +0000 (12:05 +0100)
commit051e69f3d4c6fbe67cd75ce01330bc1f4b076ce5
tree85523bb3654af880c6ae5248863ef445e7c9158e
parenta261b68abd93898dc0a95635605b442c7305bfd4
USB: serial: opticon: fix control-message timeouts

The driver was issuing synchronous uninterruptible control requests
without using a timeout. This could lead to the driver hanging
on open() or tiocmset() due to a malfunctioning (or malicious) device
until the device is physically disconnected.

The USB upper limit of five seconds per request should be more than
enough.

Fixes: 4c9d55ae7590 ("USB: opticon: add rts and cts support")
Cc: stable <stable@vger.kernel.org> # 2.6.39
Cc: Martin Jansen <martin.jansen@opticon.com>
Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Johan Hovold <johan@kernel.org>
drivers/usb/serial/opticon.c