* [PATCH] accel/qaic: Fix dma_free_attrs() buffer size
@ 2026-02-10 8:35 Thomas Fourier
2026-02-23 23:33 ` Dmitry Baryshkov
0 siblings, 1 reply; 2+ messages in thread
From: Thomas Fourier @ 2026-02-10 8:35 UTC (permalink / raw)
Cc: Thomas Fourier, stable, Rob Clark, Sean Paul, Konrad Dybcio,
Akhil P Oommen, Dmitry Baryshkov, Abhinav Kumar, Jessica Zhang,
Marijn Suijten, David Airlie, Simona Vetter, Jonathan Marek,
linux-arm-msm, dri-devel, freedreno, linux-kernel
The gpummu->table buffer is alloc'd with size TABLE_SIZE + 32 in
a2xx_gpummu_new() but freed with size TABLE_SIZE in
a2xx_gpummu_destroy().
Change the free size to match the allocation.
Fixes: c2052a4e5c99 ("drm/msm: implement a2xx mmu")
Cc: <stable@vger.kernel.org>
Signed-off-by: Thomas Fourier <fourier.thomas@gmail.com>
---
drivers/gpu/drm/msm/adreno/a2xx_gpummu.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/msm/adreno/a2xx_gpummu.c b/drivers/gpu/drm/msm/adreno/a2xx_gpummu.c
index 0407c9bc8c1b..4467b04527cd 100644
--- a/drivers/gpu/drm/msm/adreno/a2xx_gpummu.c
+++ b/drivers/gpu/drm/msm/adreno/a2xx_gpummu.c
@@ -78,7 +78,7 @@ static void a2xx_gpummu_destroy(struct msm_mmu *mmu)
{
struct a2xx_gpummu *gpummu = to_a2xx_gpummu(mmu);
- dma_free_attrs(mmu->dev, TABLE_SIZE, gpummu->table, gpummu->pt_base,
+ dma_free_attrs(mmu->dev, TABLE_SIZE + 32, gpummu->table, gpummu->pt_base,
DMA_ATTR_FORCE_CONTIGUOUS);
kfree(gpummu);
--
2.43.0
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [PATCH] accel/qaic: Fix dma_free_attrs() buffer size
2026-02-10 8:35 [PATCH] accel/qaic: Fix dma_free_attrs() buffer size Thomas Fourier
@ 2026-02-23 23:33 ` Dmitry Baryshkov
0 siblings, 0 replies; 2+ messages in thread
From: Dmitry Baryshkov @ 2026-02-23 23:33 UTC (permalink / raw)
To: Thomas Fourier
Cc: stable, Rob Clark, Sean Paul, Konrad Dybcio, Akhil P Oommen,
Dmitry Baryshkov, Abhinav Kumar, Jessica Zhang, Marijn Suijten,
David Airlie, Simona Vetter, Jonathan Marek, linux-arm-msm,
dri-devel, freedreno, linux-kernel
On Tue, Feb 10, 2026 at 09:35:27AM +0100, Thomas Fourier wrote:
> The gpummu->table buffer is alloc'd with size TABLE_SIZE + 32 in
> a2xx_gpummu_new() but freed with size TABLE_SIZE in
> a2xx_gpummu_destroy().
>
> Change the free size to match the allocation.
>
> Fixes: c2052a4e5c99 ("drm/msm: implement a2xx mmu")
> Cc: <stable@vger.kernel.org>
> Signed-off-by: Thomas Fourier <fourier.thomas@gmail.com>
> ---
> drivers/gpu/drm/msm/adreno/a2xx_gpummu.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
Note, your subject is preffix is wrong. Could you please correct it?
> diff --git a/drivers/gpu/drm/msm/adreno/a2xx_gpummu.c b/drivers/gpu/drm/msm/adreno/a2xx_gpummu.c
> index 0407c9bc8c1b..4467b04527cd 100644
> --- a/drivers/gpu/drm/msm/adreno/a2xx_gpummu.c
> +++ b/drivers/gpu/drm/msm/adreno/a2xx_gpummu.c
> @@ -78,7 +78,7 @@ static void a2xx_gpummu_destroy(struct msm_mmu *mmu)
> {
> struct a2xx_gpummu *gpummu = to_a2xx_gpummu(mmu);
>
> - dma_free_attrs(mmu->dev, TABLE_SIZE, gpummu->table, gpummu->pt_base,
> + dma_free_attrs(mmu->dev, TABLE_SIZE + 32, gpummu->table, gpummu->pt_base,
> DMA_ATTR_FORCE_CONTIGUOUS);
>
> kfree(gpummu);
> --
> 2.43.0
>
--
With best wishes
Dmitry
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-02-23 23:33 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-02-10 8:35 [PATCH] accel/qaic: Fix dma_free_attrs() buffer size Thomas Fourier
2026-02-23 23:33 ` Dmitry Baryshkov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox