]> www.infradead.org Git - users/hch/uuid.git/commitdiff
dmaengine: sh: rz-dmac: Fix lockdep assert warning
authorBiju Das <biju.das.jz@bp.renesas.com>
Tue, 25 Jun 2024 17:01:16 +0000 (18:01 +0100)
committerVinod Koul <vkoul@kernel.org>
Fri, 28 Jun 2024 07:19:27 +0000 (12:49 +0530)
Fix the below lockdep assert warning by holding vc.lock for
vchan_get_all_descriptors().

WARNING: virt-dma.h:188 rz_dmac_terminate_all
pc : rz_dmac_terminate_all

Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Link: https://lore.kernel.org/r/20240625170119.173595-1-biju.das.jz@bp.renesas.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
drivers/dma/sh/rz-dmac.c

index 1f1e86ba5c66aa8c33556eabb34a94ba431e4cc8..65a27c5a7bce3f12806e971defb4070294279e41 100644 (file)
@@ -540,8 +540,8 @@ static int rz_dmac_terminate_all(struct dma_chan *chan)
        spin_lock_irqsave(&channel->vc.lock, flags);
        list_splice_tail_init(&channel->ld_active, &channel->ld_free);
        list_splice_tail_init(&channel->ld_queue, &channel->ld_free);
-       spin_unlock_irqrestore(&channel->vc.lock, flags);
        vchan_get_all_descriptors(&channel->vc, &head);
+       spin_unlock_irqrestore(&channel->vc.lock, flags);
        vchan_dma_desc_free_list(&channel->vc, &head);
 
        return 0;