kernel_samsung_a53x/drivers/media
Ricardo Ribalda c45f4abba3 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>
2025-01-19 14:52:22 +01:00
..
cec media: pulse8-cec: fix data timestamp at pulse8_setup() 2024-11-30 02:33:23 +01:00
common media: v4l2-tpg: prevent the risk of a division by zero 2024-11-30 02:33:23 +01:00
dvb-core media: dvbdev: fix the logic when DVB_DYNAMIC_MINORS is not set 2024-12-17 13:20:51 +01:00
dvb-frontends media: dvb-frontends: dib3000mb: fix uninit-value in dib3000_write_reg 2025-01-15 16:29:47 +01:00
firewire
i2c media: v4l2-core: v4l2-dv-timings: check cvt/gtf result 2024-12-17 13:24:20 +01:00
mc media: mc: mark the media devnode as registered from the, start 2024-11-19 12:27:17 +01:00
mmc
pci Revert "media: solo6x10: replace max(a, min(b, c)) by clamp(b, a, c)" 2024-11-24 00:23:52 +01:00
platform media: qcom: camss: Add check for v4l2_fwnode_endpoint_parse 2025-01-19 00:10:01 +01:00
radio media: wl128x: Fix atomicity violation in fmc_send_cmd() 2024-12-17 13:24:20 +01:00
rc lirc: rc_dev_get_from_fd(): fix file leak 2024-11-23 23:20:18 +01:00
spi
test-drivers media: vivid: fix wrong sizeimage value for mplane 2025-01-19 00:10:02 +01:00
tuners media: xc4000: Fix atomicity violation in xc4000_get_frequency 2024-11-19 09:22:15 +01:00
usb media: uvcvideo: Enforce alignment of frame and interval 2025-01-19 14:52:22 +01:00
v4l2-core Reapply "media: v4l: Use interruptible waits" 2024-12-18 11:24:07 +01:00
Kconfig
Makefile