dmaengine: tegra: Fix memory leak in terminate_all()
Subsystems (3)
PATCH 1/1 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 ee17028009d4 ("dmaengine: tegra: Add tegra gpcdma driver")
Signed-off-by Akhil R <[email protected]>
--- drivers/dma/tegra186-gpc-dma.c | 1 + 1 file changed, 1 insertion(+)
drivers/dma/tegra186-gpc-dma.c +1 -0
@@ -711,6 +711,7 @@ static int tegra_dma_terminate_all(struct dma_chan *dc)return err; } +vchan_terminate_vdesc (&tdc->dma_desc->vd);tegra_dma_disable (tdc); tdc->dma_desc =NULL ; }
Signature · 1 line
2.17.1
Quoted 6 lines · Akhil R
Terminate vdesc when terminating an ongoing transfer.
This will ensure that the vdesc is present in thedesc_terminatedlist The descriptor will be freed later indesc_free_list().This fixes the memory leaks which can happen when terminating an ongoing transfer.
Applied, thanks
Signature · 1 line
~Vinod