summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJack Xiao <Jack.Xiao@amd.com>2024-04-22 11:22:54 +0300
committerAlex Deucher <alexander.deucher@amd.com>2024-04-27 00:22:39 +0300
commitf88da7fbf665ffdcbf5b439922a231bec6c0cf01 (patch)
tree091a474d583262d63e4c42444a9c626b109592d8
parente0a9bbeea00234c468607b369816547ca8c86458 (diff)
downloadlinux-f88da7fbf665ffdcbf5b439922a231bec6c0cf01.tar.xz
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 <Jack.Xiao@amd.com> Acked-by: Lijo Lazar <lijo.lazar@amd.com> Acked-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_mes.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_mes.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_mes.c
index 7d215f280aab..310c8f0c21da 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_mes.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_mes.c
@@ -1128,6 +1128,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);
}