From: Jack Xiao Date: Mon, 22 Apr 2024 08:22:54 +0000 (+0800) Subject: drm/amdgpu/mes: fix use-after-free issue X-Git-Tag: v6.9-rc6~23^2~3^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=948255282074d9367e01908b3f5dcf8c10fc9c3d;p=thirdparty%2Flinux.git drm/amdgpu/mes: fix use-after-free issue Delete fence fallback timer to fix the ramdom use-after-free issue. v2: move to amdgpu_mes.c Signed-off-by: Jack Xiao Acked-by: Lijo Lazar Acked-by: Christian König Signed-off-by: Alex Deucher --- diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_mes.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_mes.c index a00cf4756ad0e..1569bef030eac 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_mes.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_mes.c @@ -1132,6 +1132,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); }