dmaengine: imx-sdma: fix cyclic buffer race condition
authorTomasz Moń <tomasz.mon@camlingroup.com>
Mon, 17 Jan 2022 09:19:55 +0000 (10:19 +0100)
committerVinod Koul <vkoul@kernel.org>
Tue, 15 Feb 2022 05:41:06 +0000 (11:11 +0530)
commit177360e04b70b1d3937471e42201cdbb831a82da
treea36f93feae648f04e9995e5d4abff01e5cb2053e
parent5b215c28b923539a04587b6a3f78a449f967ae32
dmaengine: imx-sdma: fix cyclic buffer race condition

Assign buffer ownership to SDMA after invoking descriptor callback to
make sure that SDMA does not write to the buffer before it is read by
the CPU.

Signed-off-by: Tomasz Moń <tomasz.mon@camlingroup.com>
Link: https://lore.kernel.org/r/20220117091955.1038937-2-tomasz.mon@camlingroup.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
drivers/dma/imx-sdma.c