]> git.ipfire.org Git - thirdparty/kernel/linux.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)
committerSteven Price <steven.price@arm.com>
Mon, 10 Nov 2025 15:10:33 +0000 (15:10 +0000)
commit4492d54d59872bb72e119ff9f77969ab4d8a0e6b
tree23667577b8038dab94441652acefe89d73ce9358
parent3dd0be7a301bb0adcca4f7021cfd2e366ca90a0e
drm/panthor: Fix potential memleak of vma structure

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
drivers/gpu/drm/panthor/panthor_mmu.c