Skip to content

Commit 506875c

Browse files
ambarusvinodkoul
authored andcommitted
dmaengine: at_xdmac: Fix concurrency over chan's completed_cookie
Caller of dma_cookie_complete is expected to hold a lock to prevent concurrency over the channel's completed cookie marker. Call dma_cookie_complete() with the lock held. Fixes: e1f7c9e ("dmaengine: at_xdmac: creation of the atmel eXtended DMA Controller driver") Signed-off-by: Tudor Ambarus <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Vinod Koul <[email protected]>
1 parent 5edc24a commit 506875c

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

drivers/dma/at_xdmac.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1703,11 +1703,10 @@ static void at_xdmac_tasklet(struct tasklet_struct *t)
17031703
}
17041704

17051705
txd = &desc->tx_dma_desc;
1706-
1706+
dma_cookie_complete(txd);
17071707
at_xdmac_remove_xfer(atchan, desc);
17081708
spin_unlock_irq(&atchan->lock);
17091709

1710-
dma_cookie_complete(txd);
17111710
if (txd->flags & DMA_PREP_INTERRUPT)
17121711
dmaengine_desc_get_callback_invoke(txd, NULL);
17131712

0 commit comments

Comments
 (0)