mirror of
https://github.com/torvalds/linux.git
synced 2026-05-26 16:12:59 +02:00
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
This commit is contained in:
parent
ff60c8da0a
commit
a257e81822
|
|
@ -1142,6 +1142,7 @@ void panthor_fw_unplug(struct panthor_device *ptdev)
|
|||
* state to keep the active_refcnt balanced.
|
||||
*/
|
||||
panthor_vm_put(ptdev->fw->vm);
|
||||
ptdev->fw->vm = NULL;
|
||||
|
||||
panthor_gpu_power_off(ptdev, L2, ptdev->gpu_info.l2_present, 20000);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user