Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

drm/panthor: Reset the FW VM to NULL on unplug

This way get NULL derefs instead of use-after-free if the FW VM is
referenced after the device has been unplugged.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Steven Price <steven.price@arm.com>
Acked-by: Liviu Dudau <liviu.dudau@arm.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240502183813.1612017-4-boris.brezillon@collabora.com

+1
+1
drivers/gpu/drm/panthor/panthor_fw.c
··· 1142 1142 * state to keep the active_refcnt balanced. 1143 1143 */ 1144 1144 panthor_vm_put(ptdev->fw->vm); 1145 + ptdev->fw->vm = NULL; 1145 1146 1146 1147 panthor_gpu_power_off(ptdev, L2, ptdev->gpu_info.l2_present, 20000); 1147 1148 }