linux/drivers/media/test-drivers
Hans Verkuil 5fd3269dfa media: vivid: fix wrong pixel_array control size
commit 3e43442d49 upstream.

The pixel_array control size was calculated incorrectly:
the dimensions were swapped (dims[0] should be the height), and the
values should be the width or height divided by PIXEL_ARRAY_DIV
and rounded up. So don't use roundup, but use DIV_ROUND_UP instead.

This bug is harmless in the sense that nothing will break, except that
it consumes way too much memory for this control.

Fixes: 6bc7643d1b ("media: vivid: add pixel_array test control")
Cc: <stable@vger.kernel.org>
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
History 2025-08-28 16:31:00 +02:00
..
vicodec media: vicodec: allow en/decoder cmd w/o CAPTURE 2024-08-25 08:15:24 +02:00
vidtv media: vidtv: Terminating the subsequent process of initialization failure 2025-06-27 11:11:18 +01:00
vimc media: vimc: skip .s_stream() for stopped entities 2025-04-10 14:39:40 +02:00
visl media: visl: Fix ERANGE error when setting enum controls 2025-04-20 10:15:35 +02:00
vivid media: vivid: fix wrong pixel_array control size 2025-08-28 16:31:00 +02:00
Kconfig media: drop CONFIG_MEDIA_CONTROLLER_REQUEST_API 2023-11-23 13:03:45 +01:00
Makefile media: visl: add virtual stateless decoder driver 2022-11-25 07:32:16 +00:00
vim2m.c media: vim2m: print device name after registering device 2025-04-20 10:15:33 +02:00