]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
media: usbtv: Lock resolution while streaming
authorLudwig Disterhof <ludwig@disterhof.eu>
Mon, 28 Apr 2025 18:16:50 +0000 (20:16 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 28 Aug 2025 14:26:08 +0000 (16:26 +0200)
commitef9b3c22405192afaa279077ddd45a51db90b83d
treefc2d78504bcec9ad4559d97d454247acb194c482
parent8a751ccf820cfb0ce57f0d393fb2e56af6f02c35
media: usbtv: Lock resolution while streaming

commit 7e40e0bb778907b2441bff68d73c3eb6b6cd319f upstream.

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]
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/media/usb/usbtv/usbtv-video.c