Skip to content

Commit a7a7ee6

Browse files
Akhil Rvinodkoul
authored andcommitted
dmaengine: tegra: Fix memory leak in terminate_all()
Terminate vdesc when terminating an ongoing transfer. This will ensure that the vdesc is present in the desc_terminated list The descriptor will be freed later in desc_free_list(). This fixes the memory leaks which can happen when terminating an ongoing transfer. Fixes: ee17028 ("dmaengine: tegra: Add tegra gpcdma driver") Signed-off-by: Akhil R <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Vinod Koul <[email protected]>
1 parent 596b53c commit a7a7ee6

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

drivers/dma/tegra186-gpc-dma.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -711,6 +711,7 @@ static int tegra_dma_terminate_all(struct dma_chan *dc)
711711
return err;
712712
}
713713

714+
vchan_terminate_vdesc(&tdc->dma_desc->vd);
714715
tegra_dma_disable(tdc);
715716
tdc->dma_desc = NULL;
716717
}

0 commit comments

Comments
 (0)