drm/panthor: Keep a ref to the VM at the panthor_kernel_bo level
authorBoris Brezillon <boris.brezillon@collabora.com>
Thu, 2 May 2024 18:38:10 +0000 (20:38 +0200)
committerBoris Brezillon <boris.brezillon@collabora.com>
Mon, 13 May 2024 07:52:13 +0000 (09:52 +0200)
commitff60c8da0aaf7ecf5f4d48bebeb3c1f52b2088dd
tree23dd2d0ef24e7f21a55c54fbf2664161e1ee242c
parent2b2a26b3314210585ca6d552a421921a3936713b
drm/panthor: Keep a ref to the VM at the panthor_kernel_bo level

Avoids use-after-free situations when panthor_fw_unplug() is called
and the kernel BO was mapped to the FW VM.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Steven Price <steven.price@arm.com>
Reviewed-by: Liviu Dudau <liviu.dudau@arm.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240502183813.1612017-3-boris.brezillon@collabora.com
drivers/gpu/drm/panthor/panthor_fw.c
drivers/gpu/drm/panthor/panthor_gem.c
drivers/gpu/drm/panthor/panthor_gem.h
drivers/gpu/drm/panthor/panthor_heap.c
drivers/gpu/drm/panthor/panthor_sched.c