Skip to content

Commit f6a426a

Browse files
nunojsagregkh
authored andcommitted
dmaengine: axi-dmac: fix possible race in remove()
commit 1bc3144 upstream. 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: [email protected] Signed-off-by: Nuno Sa <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Vinod Koul <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent eab9d5a commit f6a426a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/dma/dma-axi-dmac.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1036,8 +1036,8 @@ static int axi_dmac_remove(struct platform_device *pdev)
10361036
{
10371037
struct axi_dmac *dmac = platform_get_drvdata(pdev);
10381038

1039-
of_dma_controller_free(pdev->dev.of_node);
10401039
free_irq(dmac->irq, dmac);
1040+
of_dma_controller_free(pdev->dev.of_node);
10411041
tasklet_kill(&dmac->chan.vchan.task);
10421042
dma_async_device_unregister(&dmac->dma_dev);
10431043
clk_disable_unprepare(dmac->clk);

0 commit comments

Comments
 (0)