]> git.baikalelectronics.ru Git - kernel.git/commit
media: usbtv: fix control-message timeouts
authorJohan Hovold <johan@kernel.org>
Mon, 13 Jan 2020 17:18:18 +0000 (18:18 +0100)
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Mon, 24 Feb 2020 15:13:26 +0000 (16:13 +0100)
commit2b51893906ce049e34941c95876b00750b95a476
treed82e97b54e1709c42edbc2ca8207ab00ad7959a5
parenta42ae6940750399b82bf7bfa4401eec6cd43cdd1
media: usbtv: fix control-message timeouts

The driver was issuing synchronous uninterruptible control requests
without using a timeout. This could lead to the driver hanging on
various user requests 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: 292656b19e96 ("[media] usbtv: Add driver for Fushicai USBTV007 video frame grabber")
Fixes: 81df002f06c8 ("[media] usbtv: add video controls")
Cc: stable <stable@vger.kernel.org> # 3.11
Signed-off-by: Johan Hovold <johan@kernel.org>
Acked-by: Lubomir Rintel <lkundrak@v3.sk>
Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
drivers/media/usb/usbtv/usbtv-core.c
drivers/media/usb/usbtv/usbtv-video.c