linux/drivers/media/platform
Ricardo Ribalda daaea1706d media: venus: venc: Clamp param smaller than 1fps and bigger than 240
commit 417c01b92e upstream.

The driver uses "whole" fps in all its calculations (e.g. in
load_per_instance()). Those calculation expect an fps bigger than 1, and
not big enough to overflow.

Clamp the param if the user provides a value that will result in an invalid
fps.

Reported-by: Hans Verkuil <hverkuil@xs4all.nl>
Closes: https://lore.kernel.org/linux-media/f11653a7-bc49-48cd-9cdb-1659147453e4@xs4all.nl/T/#m91cd962ac942834654f94c92206e2f85ff7d97f0
Fixes: aaaa93eda6 ("[media] media: venus: venc: add video encoder files")
Cc: stable@vger.kernel.org
Signed-off-by: Ricardo Ribalda <ribalda@chromium.org>
[bod: Change "parm" to "param"]
Signed-off-by: Bryan O'Donoghue <bod@kernel.org>
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
History 2025-08-28 16:31:01 +02:00
..
allegro-dvt media: platform: allgro-dvt: unregister v4l2_device on the error path 2025-04-10 14:39:12 +02:00
amlogic media: ge2d: Convert to platform remove callback returning void 2023-04-11 16:59:14 +02:00
amphion media: amphion: Fix pm_runtime_set_suspended() with runtime pm enabled 2024-12-09 10:40:59 +01:00
aspeed media: videobuf2: core: Rename min_buffers_needed field in vb2_queue 2023-12-13 17:31:27 +01:00
atmel media: atmel-isi: use 'time_left' variable with wait_for_completion_timeout() 2024-08-09 07:56:39 +02:00
broadcom media: bcm2835-unicam: Disable trigger mode operation 2025-02-21 14:01:23 +01:00
cadence media: cadence: csi2rx: configure DPHY before starting source stream 2024-04-22 11:41:04 +02:00
chips-media media: chips-media: wave5: Fix timeout while testing 10bit hevc fluster 2025-04-20 10:15:38 +02:00
imagination media: imagination: fix a potential memory leak in e5010_probe() 2025-06-27 11:11:17 +01:00
intel media: Convert from tasklet to BH workqueue 2024-06-21 08:57:09 +02:00
marvell media: mmp: Bring back registration of the device 2025-02-17 10:05:33 +01:00
mediatek media: mediatek: vcodec: Correct vsi_core framebuffer size 2025-06-27 11:11:17 +01:00
microchip media: microchip-isc: Drop v4l2_subdev_link_validate() for video devices 2024-08-26 16:36:11 +03:00
nuvoton media: nuvoton: Fix reference handling of ece_pdev 2025-04-20 10:15:37 +02:00
nvidia media: tegra-vde: use 'time_left' variable with wait_for_completion_interruptible_timeout() 2024-08-09 07:56:39 +02:00
nxp media: imx-jpeg: Cleanup after an allocation error 2025-06-27 11:11:18 +01:00
qcom media: venus: venc: Clamp param smaller than 1fps and bigger than 240 2025-08-28 16:31:01 +02:00
raspberrypi media: pisp_be: Fix pm_runtime underrun in probe 2025-08-28 16:31:01 +02:00
renesas move asm/unaligned.h to linux/unaligned.h 2024-10-02 17:23:23 -04:00
rockchip media: rockchip: rga: fix rga offset lookup 2025-04-20 10:15:33 +02:00
samsung media: s5p-mfc: Corrected NV12M/NV21M plane-sizes 2025-04-20 10:15:15 +02:00
st media: c8sectpfe: Call of_node_put(i2c_bus) only once in c8sectpfe_probe() 2025-05-29 11:02:28 +02:00
sunxi media: sun4i_csi: Don't use v4l2_subdev_link_validate() for video device 2024-08-26 16:36:14 +03:00
ti media: ti: j721e-csi2rx: fix list_del corruption 2025-08-15 12:14:14 +02:00
verisilicon media: verisilicon: Fix AV1 decoder clock frequency 2025-08-28 16:31:00 +02:00
via media: via: Use correct dependency for camera sensor drivers 2023-09-14 12:38:17 +02:00
xilinx media: platform: xilinx: use for_each_endpoint_of_node() 2024-08-09 07:56:39 +02:00
Kconfig media: raspberrypi: Add support for PiSP BE 2024-06-27 13:06:47 +02:00
m2m-deinterlace.c media: m2m-deinterlace: remove unused struct 'vb2_dc_conf' 2024-05-31 13:51:17 +02:00
Makefile media: raspberrypi: Add support for PiSP BE 2024-06-27 13:06:47 +02:00
video-mux.c media: v4l2-subdev: Rename .init_cfg() operation to .init_state() 2023-12-04 10:37:47 +01:00