diff options
author | Hans Verkuil <hverkuil-cisco@xs4all.nl> | 2022-10-12 15:32:28 +0100 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@kernel.org> | 2022-10-25 16:38:53 +0100 |
commit | f8bcaf714abfc94818dff8c0db84d750433984f4 (patch) | |
tree | f80e490088b1ceabcb0be18d7a5580d6d6cb7c56 /drivers/media/test-drivers/vivid/vivid-core.h | |
parent | 247f34f7b80357943234f93f247a1ae6b6c3a740 (diff) | |
download | linux-f8bcaf714abfc94818dff8c0db84d750433984f4.tar.bz2 |
media: vivid: s_fbuf: add more sanity checks
VIDIOC_S_FBUF is by definition a scary ioctl, which is why only root
can use it. But at least check if the framebuffer parameters match that
of one of the framebuffer created by vivid, and reject anything else.
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Fixes: ef834f7836ec ([media] vivid: add the video capture and output parts)
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
Diffstat (limited to 'drivers/media/test-drivers/vivid/vivid-core.h')
-rw-r--r-- | drivers/media/test-drivers/vivid/vivid-core.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/media/test-drivers/vivid/vivid-core.h b/drivers/media/test-drivers/vivid/vivid-core.h index bfcfb3515901..473f3598db5a 100644 --- a/drivers/media/test-drivers/vivid/vivid-core.h +++ b/drivers/media/test-drivers/vivid/vivid-core.h @@ -613,4 +613,6 @@ static inline bool vivid_is_hdmi_out(const struct vivid_dev *dev) return dev->output_type[dev->output] == HDMI; } +bool vivid_validate_fb(const struct v4l2_framebuffer *a); + #endif |