linux/drivers/dma/sh
Claudiu Beznea 4829df95da dmaengine: sh: rz-dmac: Protect the driver specific lists
[ Upstream commit abb863e621 ]

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: 5000d37042 ("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>
[ replaced scoped_guard(spinlock_irqsave) with explicit spin_lock_irqsave/spin_unlock_irqrestore calls ]
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
History 2026-04-18 10:33:38 +02:00
..
Kconfig dmaengine: sh: Add DMAC driver for RZ/G2L SoC 2021-08-29 19:14:19 +05:30
Makefile dmaengine: sh: Add DMAC driver for RZ/G2L SoC 2021-08-29 19:14:19 +05:30
rcar-dmac.c dmaengine: sh: rcar-dmac: Check for error num after dma_set_max_seg_size 2022-02-23 12:03:21 +01:00
rz-dmac.c dmaengine: sh: rz-dmac: Protect the driver specific lists 2026-04-18 10:33:38 +02:00
shdma-arm.h dmaengine: use SPDX identifier for Renesas drivers 2018-08-29 21:58:49 +05:30
shdma-base.c dmaengine: sh: setup_xref error handling 2025-12-07 06:09:20 +09:00
shdma.h dmaengine: shdma: increase size of 'dev_id' 2024-03-01 13:21:43 +01:00
shdmac.c dmaengine: sh: setup_xref error handling 2025-12-07 06:09:20 +09:00
usb-dmac.c dmaengine: usb-dmac: make usb_dmac_get_current_residue unsigned 2021-08-02 12:16:47 +05:30