6.12-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Bart Van Assche <[email protected]>

[ Upstream commit 5e0bcc7b88bcd081aaae6f481b10d9ab294fcb69 ]

Mutexes must be unlocked before these are destroyed. This has been detected
by the Clang thread-safety analyzer.

Cc: Alex Deucher <[email protected]>
Cc: Christian König <[email protected]>
Cc: Yang Wang <[email protected]>
Cc: Hawking Zhang <[email protected]>
Cc: [email protected]
Fixes: f5e4cc8461c4 ("drm/amdgpu: implement RAS ACA driver framework")
Reviewed-by: Yang Wang <[email protected]>
Acked-by: Christian König <[email protected]>
Signed-off-by: Bart Van Assche <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
(cherry picked from commit 270258ba320beb99648dceffb67e86ac76786e55)
Signed-off-by: Sasha Levin <[email protected]>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_aca.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_aca.c 
b/drivers/gpu/drm/amd/amdgpu/amdgpu_aca.c
index a7ecc33ddf223..ef5356b5a65ec 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_aca.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_aca.c
@@ -583,6 +583,7 @@ static void aca_error_fini(struct aca_error *aerr)
                aca_bank_error_remove(aerr, bank_error);
 
 out_unlock:
+       mutex_unlock(&aerr->lock);
        mutex_destroy(&aerr->lock);
 }
 
-- 
2.51.0



Reply via email to