WSL2-Linux-Kernel/drivers/media
Ricardo Ribalda 68a772884b media: uvcvideo: Enforce alignment of frame and interval
[ Upstream commit c8931ef55bd325052ec496f242aea7f6de47dc9c ]

Struct uvc_frame and interval (u32*) are packaged together on
streaming->formats on a single contiguous allocation.

Right now they are allocated right after uvc_format, without taking into
consideration their required alignment.

This is working fine because both structures have a field with a
pointer, but it will stop working when the sizeof() of any of those
structs is not a multiple of the sizeof(void*).

Enforce that alignment during the allocation.

Signed-off-by: Ricardo Ribalda <ribalda@chromium.org>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Link: https://lore.kernel.org/r/20240404-uvc-align-v2-1-9e104b0ecfbd@chromium.org
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-09-12 11:07:42 +02:00
..
cec media: cec: core: add adap_nb_transmit_canceled() callback 2024-06-16 13:39:53 +02:00
common media: v4l2-tpg: fix some memleaks in tpg_alloc 2024-03-26 18:21:26 -04:00
dvb-core media: drivers/media/dvb-core: copy user arrays safely 2024-09-04 13:23:24 +02:00
dvb-frontends media: dvb-frontends: tda10048: Fix integer overflow 2024-07-18 13:07:28 +02:00
firewire media: firewire: firedtv-avc: fix a buffer overflow in avc_ca_pmt() 2021-11-06 14:13:30 +01:00
i2c media: i2c: Fix imx412 exposure control 2024-08-19 05:45:00 +02:00
mc media: mc: mark the media devnode as registered from the, start 2024-06-16 13:39:56 +02:00
mmc
pci media: solo6x10: replace max(a, min(b, c)) by clamp(b, a, c) 2024-09-04 13:23:31 +02:00
platform media: qcom: venus: fix incorrect return value 2024-09-04 13:23:22 +02:00
radio media: radio-isa: use dev_name to fill in bus_info 2024-09-04 13:23:21 +02:00
rc lirc: rc_dev_get_from_fd(): fix file leak 2024-08-19 05:45:25 +02:00
spi media: cxd2880-spi: Fix a null pointer dereference on error handling path 2021-11-18 19:16:27 +01:00
test-drivers media: vivid: avoid integer overflow 2023-11-28 16:56:20 +00:00
tuners media: xc4000: Fix atomicity violation in xc4000_get_frequency 2024-04-10 16:18:34 +02:00
usb media: uvcvideo: Enforce alignment of frame and interval 2024-09-12 11:07:42 +02:00
v4l2-core media: v4l2-core: hold videodev_lock until dev reg, finishes 2024-06-16 13:39:57 +02:00
Kconfig media: correct MEDIA_TEST_SUPPORT help text 2022-01-27 11:05:20 +01:00
Makefile