linux/drivers/media/common
Hans Verkuil 1df7b8cd3a media: videobuf2: improve max_num_buffers sanity checks
Ensure that drivers set max_num_buffers to a value >= 32.
For now there is no reason for drivers to request a lower
limit and doing so might potentially cause userspace issues.
Note that the old check of > MAX_BUFFER_INDEX was pointless
since q->max_num_buffers was already limited to MAX_BUFFER_INDEX
or less.

Also add a sanity check in __vb2_init_fileio(), returning
-ENOSPC if a driver returns more than 32 buffers from
VIDIOC_REQBUFS with count = q->min_reqbufs_allocation.

The vb2_fileio_data struct only supports up to 32 buffers,
so we need a check there.

Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
2024-04-24 13:49:55 +02:00
..
b2c2 media: b2c2: flexcop: Convert to SPDX identifier 2021-12-07 11:29:58 +01:00
saa7146 media: videobuf2: core: Rename min_buffers_needed field in vb2_queue 2023-12-13 17:31:27 +01:00
siano Normalise "name (ad@dr)" MODULE_AUTHORs to "name <ad@dr>" 2024-03-06 13:07:39 -08:00
v4l2-tpg media: v4l2-tpg: fix some memleaks in tpg_alloc 2024-02-05 12:57:45 +01:00
videobuf2 media: videobuf2: improve max_num_buffers sanity checks 2024-04-24 13:49:55 +02:00
cx2341x.c media: Rename stateful codec control macros 2020-12-03 12:27:32 +01:00
cypress_firmware.c treewide: Add SPDX license identifier for more missed files 2019-05-21 10:50:45 +02:00
cypress_firmware.h
Kconfig media updates for v6.3-rc1 2023-02-26 11:47:26 -08:00
Makefile media updates for v6.3-rc1 2023-02-26 11:47:26 -08:00
ttpci-eeprom.c media: move ttpci-eeprom to common 2021-06-02 11:16:15 +02:00
ttpci-eeprom.h media: move ttpci-eeprom to common 2021-06-02 11:16:15 +02:00
tveeprom.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 157 2019-05-30 11:26:37 -07:00
uvc.c usb: uvc: use v4l2_fill_fmtdesc instead of open coded format name 2023-01-31 09:40:43 +01:00