summaryrefslogtreecommitdiffstats
path: root/drivers/dma/xilinx
diff options
context:
space:
mode:
authorLouis Chauvet <louis.chauvet@bootlin.com>2024-06-07 10:34:38 +0200
committerVinod Koul <vkoul@kernel.org>2024-06-07 22:41:51 +0530
commit462237d2d93fc9e9221d1cf9f773954d27da83c0 (patch)
tree6b2c4a648c9189930a71de7c1460fe9f8b7c534b /drivers/dma/xilinx
parent1613e604df0cd359cf2a7fbd9be7a0bcfacfabd0 (diff)
downloadlinux-462237d2d93fc9e9221d1cf9f773954d27da83c0.tar.gz
linux-462237d2d93fc9e9221d1cf9f773954d27da83c0.tar.bz2
linux-462237d2d93fc9e9221d1cf9f773954d27da83c0.zip
dmaengine: xilinx: xdma: Fix data synchronisation in xdma_channel_isr()
Requests the vchan lock before using xdma->stop_request. Fixes: 6a40fb824596 ("dmaengine: xilinx: xdma: Fix synchronization issue") Cc: stable@vger.kernel.org Signed-off-by: Louis Chauvet <louis.chauvet@bootlin.com> Link: https://lore.kernel.org/r/20240607-xdma-fixes-v2-1-0282319ce345@bootlin.com Signed-off-by: Vinod Koul <vkoul@kernel.org>
Diffstat (limited to 'drivers/dma/xilinx')
-rw-r--r--drivers/dma/xilinx/xdma.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/dma/xilinx/xdma.c b/drivers/dma/xilinx/xdma.c
index e143a7330816..718842fdaf98 100644
--- a/drivers/dma/xilinx/xdma.c
+++ b/drivers/dma/xilinx/xdma.c
@@ -885,11 +885,11 @@ static irqreturn_t xdma_channel_isr(int irq, void *dev_id)
u32 st;
bool repeat_tx;
+ spin_lock(&xchan->vchan.lock);
+
if (xchan->stop_requested)
complete(&xchan->last_interrupt);
- spin_lock(&xchan->vchan.lock);
-
/* get submitted request */
vd = vchan_next_desc(&xchan->vchan);
if (!vd)