]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
drm/panthor: Fix potential memleak of vma structure
authorAkash Goel <akash.goel@arm.com>
Tue, 21 Oct 2025 08:10:42 +0000 (09:10 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 18 Dec 2025 13:02:54 +0000 (14:02 +0100)
commitee8b0b284ccff4035f74367db721922f7a053ad8
tree8697f94cc1ebdd61b78be81cef50d0244b579b99
parentab5e8ebeee1caa4fcf8be7d8d62c0a7165469076
drm/panthor: Fix potential memleak of vma structure

[ Upstream commit 4492d54d59872bb72e119ff9f77969ab4d8a0e6b ]

This commit addresses a memleak issue of panthor_vma (or drm_gpuva)
structure in Panthor driver, that can happen if the GPU page table
update operation to map the pages fail.
The issue is very unlikely to occur in practice.

v2: Add panthor_vm_op_ctx_return_vma() helper (Boris)

v3: Add WARN_ON_ONCE (Boris)

Fixes: 647810ec2476 ("drm/panthor: Add the MMU/VM logical block")
Signed-off-by: Akash Goel <akash.goel@arm.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Steven Price <steven.price@arm.com>
Signed-off-by: Steven Price <steven.price@arm.com>
Link: https://patch.msgid.link/20251021081042.1377406-1-akash.goel@arm.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/gpu/drm/panthor/panthor_mmu.c