]> 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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 1 Apr 2020 09:02:16 +0000 (11:02 +0200)
commitfd39dce2a2cd31fa3b06b878d61bf13d35fa80b0
tree3dbcfa186d451747fd395b8d78864a47b653ccb7
parent47980834c4adea372d411c4f36a73c3d01cece66
media: usbtv: fix control-message timeouts

commit ee4ca7a88cc100c1af3ce1415aa53277616adee7 upstream.

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: 8f79582e1968 ("[media] usbtv: Add driver for Fushicai USBTV007 video frame grabber")
Fixes: 7ff7805ce700 ("[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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/media/usb/usbtv/usbtv-core.c
drivers/media/usb/usbtv/usbtv-video.c