]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
drm/amdgpu: Unlock a mutex before destroying it
authorBart Van Assche <bvanassche@acm.org>
Mon, 23 Feb 2026 22:00:07 +0000 (14:00 -0800)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 25 Feb 2026 22:56:43 +0000 (17:56 -0500)
Mutexes must be unlocked before these are destroyed. This has been detected
by the Clang thread-safety analyzer.

Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: Christian König <christian.koenig@amd.com>
Cc: Yang Wang <kevinyang.wang@amd.com>
Cc: Hawking Zhang <Hawking.Zhang@amd.com>
Cc: amd-gfx@lists.freedesktop.org
Fixes: f5e4cc8461c4 ("drm/amdgpu: implement RAS ACA driver framework")
Reviewed-by: Yang Wang <kevinyang.wang@amd.com>
Acked-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
(cherry picked from commit 270258ba320beb99648dceffb67e86ac76786e55)

drivers/gpu/drm/amd/amdgpu/amdgpu_aca.c

index afe5ca81beec88b156f88dd25a2b32b28419de93..db7858fe0c3d4770902c16ee3e396fb78a038401 100644 (file)
@@ -641,6 +641,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);
 }