diff options
author | Louis Chauvet <louis.chauvet@bootlin.com> | 2024-06-07 11:34:38 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2024-06-27 14:52:29 +0300 |
commit | 8e1f54e4a3f3207c9dc68bb5000603b75802e7f0 (patch) | |
tree | 9b3621041faa29085a9208088cd64b4ec6bf65cb | |
parent | f49eaf6804857d1e125f872ccc9635f003ca999c (diff) | |
download | linux-8e1f54e4a3f3207c9dc68bb5000603b75802e7f0.tar.xz |
dmaengine: xilinx: xdma: Fix data synchronisation in xdma_channel_isr()
commit 462237d2d93fc9e9221d1cf9f773954d27da83c0 upstream.
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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | drivers/dma/xilinx/xdma.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/dma/xilinx/xdma.c b/drivers/dma/xilinx/xdma.c index 313b217388fe..ae6e06057aa1 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) |