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

Signed-off-by: Robin Gong <yibin.gong@nxp.com>
Acked-by: Fugang Duan <fugang.duan@nxp.com>
Signed-off-by: Arulpandiyan Vadivel <arulpandiyan_vadivel@mentor.com>
drivers/dma/fsl-edma.c

index 56cb89c..8f21870 100644 (file)
@@ -377,6 +377,7 @@ static int fsl_edma_terminate_all(struct dma_chan *chan)
        fsl_edma_disable_request(fsl_chan);
        fsl_chan->edesc = NULL;
        fsl_chan->idle = true;
+       fsl_chan->vchan.cyclic = NULL;
        vchan_get_all_descriptors(&fsl_chan->vchan, &head);
        spin_unlock_irqrestore(&fsl_chan->vchan.lock, flags);
        vchan_dma_desc_free_list(&fsl_chan->vchan, &head);