[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20250601224231.24317-3-qasdev00@gmail.com>
Date: Sun, 1 Jun 2025 23:42:31 +0100
From: Qasim Ijaz <qasdev00@...il.com>
To: Sinan Kaya <okaya@...nel.org>,
Vinod Koul <vkoul@...nel.org>,
linux-arm-kernel@...ts.infradead.org,
linux-arm-msm@...r.kernel.org,
dmaengine@...r.kernel.org,
linux-kernel@...r.kernel.org
Cc: Qasim Ijaz <qasdev00@...il.com>,
stable@...r.kernel.org
Subject: [PATCH 2/2] dmaengine: qcom_hidma: fix handoff FIFO memory leak on driver removal
hidma_ll_init() allocates a handoff FIFO, but the matching
hidma_ll_uninit() function (which is invoked in remove())
never releases it, leaking memory.
To fix this call kfifo_free in hidma_ll_uninit().
Fixes: d1615ca2e085 ("dmaengine: qcom_hidma: implement lower level hardware interface")
Cc: stable@...r.kernel.org
Signed-off-by: Qasim Ijaz <qasdev00@...il.com>
---
drivers/dma/qcom/hidma_ll.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/dma/qcom/hidma_ll.c b/drivers/dma/qcom/hidma_ll.c
index fee448499777..0c2bae46746c 100644
--- a/drivers/dma/qcom/hidma_ll.c
+++ b/drivers/dma/qcom/hidma_ll.c
@@ -816,6 +816,7 @@ int hidma_ll_uninit(struct hidma_lldev *lldev)
required_bytes = sizeof(struct hidma_tre) * lldev->nr_tres;
tasklet_kill(&lldev->task);
+ kfifo_free(&lldev->handoff_fifo);
memset(lldev->trepool, 0, required_bytes);
lldev->trepool = NULL;
atomic_set(&lldev->pending_tre_count, 0);
--
2.39.5
Powered by blists - more mailing lists