]> git.ipfire.org Git - thirdparty/linux.git/commit
media: usbtv: Lock resolution while streaming
authorLudwig Disterhof <ludwig@disterhof.eu>
Mon, 28 Apr 2025 18:16:50 +0000 (20:16 +0200)
committerHans Verkuil <hverkuil@xs4all.nl>
Tue, 17 Jun 2025 08:35:14 +0000 (10:35 +0200)
commit7e40e0bb778907b2441bff68d73c3eb6b6cd319f
tree1492bce4bf63f0a1ed24dd6b9b8f6b62dc974706
parent065eb4d262473037ef6f7a409ed8da489bc64c4e
media: usbtv: Lock resolution while streaming

When an program is streaming (ffplay) and another program (qv4l2)
changes the TV standard from NTSC to PAL, the kernel crashes due to trying
to copy to unmapped memory.

Changing from NTSC to PAL increases the resolution in the usbtv struct,
but the video plane buffer isn't adjusted, so it overflows.

Fixes: 0e0fe3958fdd13d ("[media] usbtv: Add support for PAL video source")
Cc: stable@vger.kernel.org
Signed-off-by: Ludwig Disterhof <ludwig@disterhof.eu>
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
[hverkuil: call vb2_is_busy instead of vb2_is_streaming]
drivers/media/usb/usbtv/usbtv-video.c