]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
dmaengine: sh: rz-dmac: Protect the driver specific lists
authorClaudiu Beznea <claudiu.beznea@tuxon.dev>
Mon, 16 Mar 2026 13:32:45 +0000 (15:32 +0200)
committerVinod Koul <vkoul@kernel.org>
Tue, 17 Mar 2026 10:41:11 +0000 (16:11 +0530)
commitabb863e6213dc41a58ef8bb3289b7e77460dabf3
treec94a9db98f08b19a05c354818259e5117cf457cc
parente1c9866173c5f8521f2d0768547a01508cb9ff27
dmaengine: sh: rz-dmac: Protect the driver specific lists

The driver lists (ld_free, ld_queue) are used in
rz_dmac_free_chan_resources(), rz_dmac_terminate_all(),
rz_dmac_issue_pending(), and rz_dmac_irq_handler_thread(), all under
the virtual channel lock. Take the same lock in rz_dmac_prep_slave_sg()
and rz_dmac_prep_dma_memcpy() as well to avoid concurrency issues, since
these functions also check whether the lists are empty and update or
remove list entries.

Fixes: 5000d37042a6 ("dmaengine: sh: Add DMAC driver for RZ/G2L SoC")
Cc: stable@vger.kernel.org
Reviewed-by: Frank Li <Frank.Li@nxp.com>
Signed-off-by: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com>
Link: https://patch.msgid.link/20260316133252.240348-2-claudiu.beznea.uj@bp.renesas.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
drivers/dma/sh/rz-dmac.c