Skip to content

Commit 1bc3144

Browse files
nunojsavinodkoul
authored andcommitted
dmaengine: axi-dmac: fix possible race in remove()
We need to first free the IRQ before calling of_dma_controller_free(). Otherwise we could get an interrupt and schedule a tasklet while removing the DMA controller. Fixes: 0e3b67b ("dmaengine: Add support for the Analog Devices AXI-DMAC DMA controller") Cc: stable@kernel.org Signed-off-by: Nuno Sa <nuno.sa@analog.com> Link: https://lore.kernel.org/r/20240328-axi-dmac-devm-probe-v3-1-523c0176df70@analog.com Signed-off-by: Vinod Koul <vkoul@kernel.org>
1 parent ec177e4 commit 1bc3144

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/dma/dma-axi-dmac.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1134,8 +1134,8 @@ static void axi_dmac_remove(struct platform_device *pdev)
11341134
{
11351135
struct axi_dmac *dmac = platform_get_drvdata(pdev);
11361136

1137-
of_dma_controller_free(pdev->dev.of_node);
11381137
free_irq(dmac->irq, dmac);
1138+
of_dma_controller_free(pdev->dev.of_node);
11391139
tasklet_kill(&dmac->chan.vchan.task);
11401140
dma_async_device_unregister(&dmac->dma_dev);
11411141
clk_disable_unprepare(dmac->clk);

0 commit comments

Comments
 (0)