Skip to contentSkip to conversation

FAILED: patch "[PATCH] drm/msm: Fix dma_free_attrs() buffer size" failed to apply to 6.6-stable tree

PATCH New [email protected] 2 participants 2 messages Mar 17 – Mar 18

Subsystems (4)
lore
Share & tools
lore

[email protected]

author maintainer
#0 lore raw

The patch below does not apply to the 6.6-stable tree.
If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to <[email protected]>.

To reproduce the conflict and resubmit, you may use the following commands:

git fetch https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/ linux-6.6.y
git checkout FETCH_HEAD
git cherry-pick -x e4eb6e4dd6348dd00e19c2275e3fbaed304ca3bd
# <resolve conflicts, build, test, etc.>
git commit -s
git send-email --to '<[email protected]>' --in-reply-to '2026031710-uptake-straining-ca85@gregkh' --subject-prefix 'PATCH 6.6.y' HEAD^..

Possible dependencies:

thanks,

greg k-h

------------------ original commit in Linus's tree ------------------

From e4eb6e4dd6348dd00e19c2275e3fbaed304ca3bd Mon Sep 17 00:00:00 2001
From: Thomas Fourier <[email protected]>
Date: Thu, 26 Feb 2026 10:57:11 +0100
Subject: [PATCH] drm/msm: Fix dma_free_attrs() buffer size

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")

Patchwork: https://patchwork.freedesktop.org/patch/707340/
Message-ID: <[email protected]>

drivers/gpu/drm/msm/adreno/a2xx_gpummu.c +1 -1
index 0407c9bc8c1b..4467b04527cd 100644
@@ -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);
maintainer
#1 lore raw

PATCH 1/1 drm/msm: Fix dma_free_attrs() buffer size

From: Thomas Fourier <[email protected]>

[ Upstream commit e4eb6e4dd6348dd00e19c2275e3fbaed304ca3bd ]

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")

Patchwork: https://patchwork.freedesktop.org/patch/707340/
Message-ID: <[email protected]>

---
 drivers/gpu/drm/msm/msm_gpummu.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/msm/msm_gpummu.c +1 -1
index f7d1945e0c9f5..ab26b7f2e0359 100644
@@ -76,7 +76,7 @@ static void msm_gpummu_destroy(struct msm_mmu *mmu)
 {
 	struct msm_gpummu *gpummu = to_msm_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);
Signature · 1 line
2.51.0