From: Bart Van Assche <bart.vanassche@linux.dev>
To: Peter Zijlstra <peterz@infradead.org>
Cc: "Ingo Molnar" <mingo@redhat.com>, "Will Deacon" <will@kernel.org>,
"Boqun Feng" <boqun@kernel.org>,
"Waiman Long" <longman@redhat.com>,
linux-kernel@vger.kernel.org, "Marco Elver" <elver@google.com>,
"Christoph Hellwig" <hch@lst.de>,
"Steven Rostedt" <rostedt@goodmis.org>,
"Nick Desaulniers" <ndesaulniers@google.com>,
"Nathan Chancellor" <nathan@kernel.org>,
"Kees Cook" <kees@kernel.org>, "Jann Horn" <jannh@google.com>,
"Bart Van Assche" <bvanassche@acm.org>,
"Alex Deucher" <alexander.deucher@amd.com>,
"Christian König" <christian.koenig@amd.com>,
"Yang Wang" <kevinyang.wang@amd.com>,
"Hawking Zhang" <Hawking.Zhang@amd.com>,
amd-gfx@lists.freedesktop.org
Subject: [PATCH 07/62] drm/amdgpu: Unlock a mutex before destroying it
Date: Mon, 23 Feb 2026 14:00:07 -0800 [thread overview]
Message-ID: <20260223220102.2158611-8-bart.vanassche@linux.dev> (raw)
In-Reply-To: <20260223220102.2158611-1-bart.vanassche@linux.dev>
From: Bart Van Assche <bvanassche@acm.org>
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")
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
---
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 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);
out_unlock:
+ mutex_unlock(&aerr->lock);
mutex_destroy(&aerr->lock);
}
next prev parent reply other threads:[~2026-02-23 22:01 UTC|newest]
Thread overview: 58+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-23 22:00 [PATCH 00/62] Bug fixes and refactoring patches related to locking Bart Van Assche
2026-02-23 22:00 ` [PATCH 01/62] kvm: Make pi_enable_wakeup_handler() easier to analyze Bart Van Assche
2026-02-23 22:00 ` [PATCH 02/62] blk-ioc: Prepare for enabling thread-safety analysis Bart Van Assche
2026-02-23 22:00 ` [PATCH 03/62] drbd: Balance RCU calls in drbd_adm_dump_devices() Bart Van Assche
2026-02-23 22:00 ` [PATCH 04/62] dax/bus.c: Fix a locking bug Bart Van Assche
2026-02-23 22:50 ` dan.j.williams
2026-02-24 12:45 ` Jonathan Cameron
2026-02-23 22:00 ` [PATCH 05/62] dma-buf: Convert dma_buf_import_sync_file() to the early-return style Bart Van Assche
2026-02-23 22:00 ` [PATCH 06/62] dma-buf: Handle all dma_resv_lock() errors Bart Van Assche
2026-02-23 22:00 ` Bart Van Assche [this message]
2026-02-24 2:41 ` [PATCH 07/62] drm/amdgpu: Unlock a mutex before destroying it Wang, Yang(Kevin)
2026-02-24 14:25 ` Alex Deucher
2026-02-23 22:00 ` [PATCH 08/62] drm/amdgpu: Fix locking bugs in error paths Bart Van Assche
2026-02-23 22:00 ` [PATCH 09/62] drm: bridge: cdns-mhdp8546: Fix a locking bug in an error path Bart Van Assche
2026-02-23 22:00 ` [PATCH 10/62] drm: Make drm_read() easier to analyze Bart Van Assche
2026-02-23 22:00 ` [PATCH 11/62] drm/pagemap: Unlock cache->lock before freeing it Bart Van Assche
2026-02-23 22:14 ` Matthew Brost
2026-02-23 22:20 ` Bart Van Assche
2026-02-23 22:34 ` Matthew Brost
2026-02-23 22:00 ` [PATCH 12/62] drm/gpusvm.c: Fix a locking bug in an error path Bart Van Assche
2026-02-23 22:11 ` Matthew Brost
2026-02-23 22:16 ` Bart Van Assche
2026-02-23 22:00 ` [PATCH 13/62] drm/qxl: Fix a buffer leak " Bart Van Assche
2026-02-23 22:00 ` [PATCH 14/62] hwmon: (it87) Check the it87_lock() return value Bart Van Assche
2026-02-24 15:31 ` Guenter Roeck
2026-02-23 22:00 ` [PATCH 15/62] Input: synaptics-rmi4 - fix a locking bug in an error path Bart Van Assche
2026-02-23 22:00 ` [PATCH 16/62] md: Make mddev_suspend() easier to analyze Bart Van Assche
2026-02-23 22:00 ` [PATCH 17/62] bnxt_en: Make bnxt_resume() " Bart Van Assche
2026-02-23 22:00 ` [PATCH 18/62] bnxt_en: Fix bnxt_dl_reload_up() Bart Van Assche
2026-02-23 22:00 ` [PATCH 19/62] ice: Fix a locking bug in an error path Bart Van Assche
2026-02-24 8:40 ` Przemek Kitszel
2026-02-24 17:43 ` Bart Van Assche
2026-02-25 13:16 ` Przemek Kitszel
2026-02-23 22:00 ` [PATCH 20/62] octeontx2-pf: Fix locking " Bart Van Assche
2026-02-23 22:00 ` [PATCH 21/62] qed: Make _qed_mcp_cmd_and_union() easier to analyze Bart Van Assche
2026-02-23 22:00 ` [PATCH 22/62] mctp i3c: Fix locking in error paths Bart Van Assche
2026-02-25 4:27 ` Matt Johnston
2026-02-23 22:00 ` [PATCH 23/62] net: phy: mxl-86110: Fix locking in an error path Bart Van Assche
2026-02-23 23:12 ` Daniel Golle
2026-02-24 0:19 ` Andrew Lunn
2026-02-23 22:00 ` [PATCH 24/62] net/cw1200: Fix locking in error paths Bart Van Assche
2026-03-02 11:08 ` Johannes Berg
2026-03-02 20:59 ` Bart Van Assche
2026-02-23 22:00 ` [PATCH 25/62] wlcore: Fix a locking bug Bart Van Assche
2026-02-23 22:00 ` [PATCH 26/62] misc: nsm: Fix a locking bug in an error path Bart Van Assche
2026-02-23 22:17 ` Alexander Graf
2026-02-23 22:00 ` [PATCH 27/62] pci: Fix locking in pci_do_resource_release_and_resize() error paths Bart Van Assche
2026-02-24 8:21 ` Ilpo Järvinen
2026-02-23 22:00 ` [PATCH 28/62] PNP: isapnp: Check the isapnp_cfg_begin() return value Bart Van Assche
2026-02-24 12:17 ` Rafael J. Wysocki
2026-02-23 22:00 ` [PATCH 29/62] fnic: Make fnic_queuecommand() easier to analyze Bart Van Assche
2026-02-24 19:31 ` Karan Tilak Kumar (kartilak)
2026-02-24 21:43 ` Martin K. Petersen
2026-02-23 22:00 ` [PATCH 30/62] megaraid: Protect more code with instance->reset_mutex Bart Van Assche
2026-02-28 22:22 ` (subset) [PATCH 00/62] Bug fixes and refactoring patches related to locking Martin K. Petersen
2026-03-01 2:16 ` Martin K. Petersen
-- strict thread matches above, loose matches on Subject: below --
2026-02-23 21:50 Bart Van Assche
2026-02-23 21:50 ` [PATCH 07/62] drm/amdgpu: Unlock a mutex before destroying it Bart Van Assche
2026-02-24 8:26 ` Christian König
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260223220102.2158611-8-bart.vanassche@linux.dev \
--to=bart.vanassche@linux.dev \
--cc=Hawking.Zhang@amd.com \
--cc=alexander.deucher@amd.com \
--cc=amd-gfx@lists.freedesktop.org \
--cc=boqun@kernel.org \
--cc=bvanassche@acm.org \
--cc=christian.koenig@amd.com \
--cc=elver@google.com \
--cc=hch@lst.de \
--cc=jannh@google.com \
--cc=kees@kernel.org \
--cc=kevinyang.wang@amd.com \
--cc=linux-kernel@vger.kernel.org \
--cc=longman@redhat.com \
--cc=mingo@redhat.com \
--cc=nathan@kernel.org \
--cc=ndesaulniers@google.com \
--cc=peterz@infradead.org \
--cc=rostedt@goodmis.org \
--cc=will@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox