linux/drivers/media/platform/broadcom
Naushir Patuck 7b1ec3e389 media: bcm2835-unicam: Fix for possible dummy buffer overrun
The Unicam hardware has been observed to cause a buffer overrun when
using the dummy buffer as a circular buffer. The conditions that cause
the overrun are not fully known, but it seems to occur when the memory
bus is heavily loaded.

To avoid the overrun, program the hardware with a buffer size of 0 when
using the dummy buffer. This will cause overrun into the allocated dummy
buffer, but avoid out of bounds writes.

Signed-off-by: Naushir Patuck <naush@raspberrypi.com>
Reviewed-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
History 2024-12-19 12:50:18 +01:00
..
bcm2835-unicam-regs.h media: bcm2835-unicam: Add support for CCP2/CSI2 camera interface 2024-04-29 14:56:37 +02:00
bcm2835-unicam.c media: bcm2835-unicam: Fix for possible dummy buffer overrun 2024-12-19 12:50:18 +01:00
Kconfig media: bcm2835-unicam: Depend on COMMON_CLK 2024-05-14 08:09:05 +02:00
Makefile media: bcm2835-unicam: Add support for CCP2/CSI2 camera interface 2024-04-29 14:56:37 +02:00