From 0989b764f43d4de2c6665c15165c251d9cfde9c0 Mon Sep 17 00:00:00 2001 From: Ce Sun Date: Tue, 19 Aug 2025 14:47:05 +0800 Subject: drm/amdgpu: Add a mutex lock to protect poison injection When poison is triggered multiple times, competition will occur. Add a mutex lock to protect poison injection Signed-off-by: Ce Sun Reviewed-by: Yang Wang Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/amdgpu_ras.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_ras.h') diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.h b/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.h index ff63020f9c6c..2a70782b07bf 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.h +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.h @@ -587,6 +587,8 @@ struct amdgpu_ras { struct list_head critical_region_head; struct mutex critical_region_lock; + /* Protect poison injection */ + struct mutex poison_lock; }; struct ras_fs_data { -- cgit v1.2.3