]> www.infradead.org Git - users/dwmw2/linux.git/commit
media: ti: j721e-csi2rx: Fix races while restarting DMA
authorJai Luthra <j-luthra@ti.com>
Fri, 23 Feb 2024 08:23:02 +0000 (13:53 +0530)
committerHans Verkuil <hverkuil-cisco@xs4all.nl>
Mon, 22 Apr 2024 09:41:04 +0000 (11:41 +0200)
commitad79c9ecea5baa7b4f19677e4b1c881ed89b0c3b
treeedcc36d59f146e3b26b4a1194bdb570c3ede15ef
parentfd64dda48f7e3f67ada1e1fe47e784ab350da72e
media: ti: j721e-csi2rx: Fix races while restarting DMA

After the frame is submitted to DMA, it may happen that the submitted
list is not updated soon enough, and the DMA callback is triggered
before that.

This can lead to kernel crashes, so move everything in a single
lock/unlock section to prevent such races.

Fixes: b4a3d877dc92 ("media: ti: Add CSI2RX support for J721E")
Signed-off-by: Jai Luthra <j-luthra@ti.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
drivers/media/platform/ti/j721e-csi2rx/j721e-csi2rx.c