MLK-19931-3: dmaengine: imx-sdma: fix potential kernel crash in cyclic
authorRobin Gong <yibin.gong@nxp.com>
Mon, 15 Oct 2018 17:35:42 +0000 (01:35 +0800)
committerLeonard Crestez <leonard.crestez@nxp.com>
Wed, 17 Apr 2019 23:51:34 +0000 (02:51 +0300)
Fix potential kernel crash issue  on imx-sdma as fsl-edma-v3.

Signed-off-by: Robin Gong <yibin.gong@nxp.com>
Acked-by: Fugang Duan <fugang.duan@nxp.com>
drivers/dma/imx-sdma.c

index 02fd964..84de526 100644 (file)
@@ -1431,6 +1431,7 @@ static int sdma_terminate_all(struct dma_chan *chan)
                spin_unlock_irqrestore(&sdmac->vc.lock, flags);
                sdmac->vc.desc_free(&desc->vd);
                spin_lock_irqsave(&sdmac->vc.lock, flags);
+               sdmac->vc.cyclic = NULL;
        }
        if (sdmac->desc)
                sdmac->desc = NULL;