Patch "dmaengine: at_xdmac: Fix concurrency over chan's completed_cookie" has been added to the 5.15-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    dmaengine: at_xdmac: Fix concurrency over chan's completed_cookie

to the 5.15-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     dmaengine-at_xdmac-fix-concurrency-over-chan-s-compl.patch
and it can be found in the queue-5.15 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit a679b2f1bd061d4a36bd58fe56cd5c23f968f495
Author: Tudor Ambarus <tudor.ambarus@xxxxxxxxxx>
Date:   Wed Dec 15 13:01:07 2021 +0200

    dmaengine: at_xdmac: Fix concurrency over chan's completed_cookie
    
    [ Upstream commit 506875c30fc5bf92246060bc3b4c38799646266b ]
    
    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: e1f7c9eee707 ("dmaengine: at_xdmac: creation of the atmel eXtended DMA Controller driver")
    Signed-off-by: Tudor Ambarus <tudor.ambarus@xxxxxxxxxxxxx>
    Link: https://lore.kernel.org/r/20211215110115.191749-5-tudor.ambarus@xxxxxxxxxxxxx
    Signed-off-by: Vinod Koul <vkoul@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/dma/at_xdmac.c b/drivers/dma/at_xdmac.c
index c5638afe94368..c6b200f0145ba 100644
--- a/drivers/dma/at_xdmac.c
+++ b/drivers/dma/at_xdmac.c
@@ -1710,11 +1710,10 @@ static void at_xdmac_tasklet(struct tasklet_struct *t)
 		}
 
 		txd = &desc->tx_dma_desc;
-
+		dma_cookie_complete(txd);
 		at_xdmac_remove_xfer(atchan, desc);
 		spin_unlock_irq(&atchan->lock);
 
-		dma_cookie_complete(txd);
 		if (txd->flags & DMA_PREP_INTERRUPT)
 			dmaengine_desc_get_callback_invoke(txd, NULL);
 



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux