dmaengine: xilinx: dpdma: Fix race condition in done IRQ
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Sun, 7 Mar 2021 04:06:29 +0000 (06:06 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 28 Apr 2021 11:40:01 +0000 (13:40 +0200)
commitdb010ba54a96128f65b388c46875e7b991982ba4
treeca84010f61cd193ea75ac8d94dfcfa9215e3e988
parente8d9a93ec46e52188a95bc87924681c379e359cd
dmaengine: xilinx: dpdma: Fix race condition in done IRQ

[ Upstream commit 868833fbffbe51c487df4f95d4de9194264a4b30 ]

The active descriptor pointer is accessed from different contexts,
including different interrupt handlers, and its access must be protected
by the channel's lock. This wasn't done in the done IRQ handler. Fix it.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Link: https://lore.kernel.org/r/20210307040629.29308-3-laurent.pinchart@ideasonboard.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/dma/xilinx/xilinx_dpdma.c