From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
To: linux-kernel@vger.kernel.org, linux-rt-devel@lists.linux.dev
Cc: Thomas Gleixner <tglx@linutronix.de>,
Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Subject: [PATCH 2/2] debugobjects: Use LD_WAIT_CONFIG instead of LD_WAIT_SLEEP
Date: Thu, 27 Nov 2025 16:36:52 +0100 [thread overview]
Message-ID: <20251127153652.291697-3-bigeasy@linutronix.de> (raw)
In-Reply-To: <20251127153652.291697-1-bigeasy@linutronix.de>
fill_pool_map is used to suppress nesting violations caused by acquiring
a spinlock_t (from within the memory allocator) while holding a
raw_spinlock_t. The used annotation is wrong.
LD_WAIT_SLEEP is for always sleeping lock types such as mutex_t.
LD_WAIT_CONFIG is for lock type which are sleeping while spinning on
PREEMPT_RT such as spinlock_t.
Use LD_WAIT_CONFIG as override.
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
---
lib/debugobjects.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/lib/debugobjects.c b/lib/debugobjects.c
index 7017e5c8f32dd..ecf8e7f978e30 100644
--- a/lib/debugobjects.c
+++ b/lib/debugobjects.c
@@ -717,10 +717,10 @@ static void debug_objects_fill_pool(void)
if (!IS_ENABLED(CONFIG_PREEMPT_RT) || preemptible() || system_state < SYSTEM_SCHEDULING) {
/*
* Annotate away the spinlock_t inside raw_spinlock_t warning
- * by temporarily raising the wait-type to WAIT_SLEEP, matching
+ * by temporarily raising the wait-type to LD_WAIT_CONFIG, matching
* the preemptible() condition above.
*/
- static DEFINE_WAIT_OVERRIDE_MAP(fill_pool_map, LD_WAIT_SLEEP);
+ static DEFINE_WAIT_OVERRIDE_MAP(fill_pool_map, LD_WAIT_CONFIG);
lock_map_acquire_try(&fill_pool_map);
fill_pool();
lock_map_release(&fill_pool_map);
--
2.51.0
next prev parent reply other threads:[~2025-11-27 15:36 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-27 15:36 [PATCH 0/2] debugobjects: RT related change and noch annotation Sebastian Andrzej Siewior
2025-11-27 15:36 ` [PATCH 1/2] debugobjects: Allow to refill the pool before SYSTEM_SCHEDULING Sebastian Andrzej Siewior
2025-11-27 15:57 ` [tip: core/debugobjects] " tip-bot2 for Sebastian Andrzej Siewior
2025-11-27 15:36 ` Sebastian Andrzej Siewior [this message]
2025-11-27 15:57 ` [tip: core/debugobjects] debugobjects: Use LD_WAIT_CONFIG instead of LD_WAIT_SLEEP tip-bot2 for Sebastian Andrzej Siewior
2025-11-28 13:21 ` [PATCH 0/2] debugobjects: RT related change and noch annotation Luis Claudio R. Goncalves
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=20251127153652.291697-3-bigeasy@linutronix.de \
--to=bigeasy@linutronix.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rt-devel@lists.linux.dev \
--cc=tglx@linutronix.de \
/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
all inboxes | Powered by JetHome®