Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 02915EFB81A for ; Tue, 24 Feb 2026 08:33:43 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id A8A1110E510; Tue, 24 Feb 2026 08:33:27 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=acm.org header.i=@acm.org header.b="pgfIbQeA"; dkim-atps=neutral Received: from 013.lax.mailroute.net (013.lax.mailroute.net [199.89.1.16]) by gabe.freedesktop.org (Postfix) with ESMTPS id DFECD10E317 for ; Mon, 23 Feb 2026 21:57:11 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by 013.lax.mailroute.net (Postfix) with ESMTP id 4fKZK03Xwyzlfl5l; Mon, 23 Feb 2026 21:50:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=acm.org; h= content-transfer-encoding:content-type:content-type:mime-version :references:in-reply-to:x-mailer:message-id:date:date:subject :subject:from:from:received:received; s=mr01; t=1771883410; x= 1774475411; bh=rEwFEZTUSl6LNKSqrsL5gdSMoPWPvyg78DBwTRH1PVQ=; b=p gfIbQeAy+5YyGWoy7oOAzhTpcaWKtmLjmWz1aRrTQqbETnYm0eLK8xU4JWZeavRI LilWDqCIf3MTNAG8MpDKDeNx5nEdmISaHNUEK8DviH0WYYadlQaKX6TKkcm3LT1o IpdetU9wS1ab7WpIqjYQmXuhWAmkRhvAHQMitOBAGT+kovelI/ZLN5Wr9mhu6sJ6 qSOUC/UCTEBtptwzFGkSfZWwvXndWADDlqHiZ/OwoxM0Uu/98obyKlOf4p4tD4k6 Ud99pgwQtSBnl9aZKsNRmeElKkKfAb/rQ2WtfrFCsDB545lopm3B2nyejw/rsfw0 BjPc5yxEmVVdC/BxADkVw== X-Virus-Scanned: by MailRoute Received: from 013.lax.mailroute.net ([127.0.0.1]) by localhost (013.lax [127.0.0.1]) (mroute_mailscanner, port 10029) with LMTP id hqStjYzH0P4O; Mon, 23 Feb 2026 21:50:10 +0000 (UTC) Received: from bvanassche.mtv.corp.google.com (unknown [104.135.180.219]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: bvanassche@acm.org) by 013.lax.mailroute.net (Postfix) with ESMTPSA id 4fKZJx2DRhzlfgPY; Mon, 23 Feb 2026 21:50:09 +0000 (UTC) From: Bart Van Assche To: Peter Zijlstra Cc: Bart Van Assche , Alex Deucher , =?UTF-8?q?Christian=20K=C3=B6nig?= , Yang Wang , Hawking Zhang , amd-gfx@lists.freedesktop.org Subject: [PATCH 07/62] drm/amdgpu: Unlock a mutex before destroying it Date: Mon, 23 Feb 2026 13:48:55 -0800 Message-ID: <20260223214950.2153735-8-bvanassche@acm.org> X-Mailer: git-send-email 2.53.0.371.g1d285c8824-goog In-Reply-To: <20260223214950.2153735-1-bvanassche@acm.org> References: <20260223214950.2153735-1-bvanassche@acm.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Mailman-Approved-At: Tue, 24 Feb 2026 08:33:26 +0000 X-BeenThere: amd-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion list for AMD gfx List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: amd-gfx-bounces@lists.freedesktop.org Sender: "amd-gfx" Mutexes must be unlocked before these are destroyed. This has been detect= ed by the Clang thread-safety analyzer. Cc: Alex Deucher Cc: Christian K=C3=B6nig Cc: Yang Wang Cc: Hawking Zhang Cc: amd-gfx@lists.freedesktop.org Fixes: f5e4cc8461c4 ("drm/amdgpu: implement RAS ACA driver framework") Signed-off-by: Bart Van Assche --- 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/am= d/amdgpu/amdgpu_aca.c index afe5ca81beec..db7858fe0c3d 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_aca.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_aca.c @@ -641,6 +641,7 @@ static void aca_error_fini(struct aca_error *aerr) aca_bank_error_remove(aerr, bank_error); =20 out_unlock: + mutex_unlock(&aerr->lock); mutex_destroy(&aerr->lock); } =20