drm/amdgpu/mes: fix use-after-free issue
authorjsg <jsg@openbsd.org>
Sat, 15 Jun 2024 03:46:43 +0000 (03:46 +0000)
committerjsg <jsg@openbsd.org>
Sat, 15 Jun 2024 03:46:43 +0000 (03:46 +0000)
From Jack Xiao
39cfce75168c11421d70b8c0c65f6133edccb82a in linux-6.6.y/6.6.33
948255282074d9367e01908b3f5dcf8c10fc9c3d in mainline linux

sys/dev/pci/drm/amd/amdgpu/amdgpu_mes.c

index a88eff2..3cb010f 100644 (file)
@@ -1098,6 +1098,7 @@ void amdgpu_mes_remove_ring(struct amdgpu_device *adev,
                return;
 
        amdgpu_mes_remove_hw_queue(adev, ring->hw_queue_id);
+       del_timer_sync(&ring->fence_drv.fallback_timer);
        amdgpu_ring_fini(ring);
        kfree(ring);
 }