diff options
| author | Sebastian Andrzej Siewior <bigeasy@linutronix.de> | 2025-11-27 16:36:52 +0100 |
|---|---|---|
| committer | Thomas Gleixner <tglx@linutronix.de> | 2025-11-27 16:55:34 +0100 |
| commit | 37de2dbc318ee10577c1c2704de5a803e75e55a2 (patch) | |
| tree | d15c59088b8369e3b7708c1e694f7028fc78bf98 | |
| parent | 06e0ae988f6e3499785c407429953ade19c1096b (diff) | |
| download | linux-37de2dbc318ee10577c1c2704de5a803e75e55a2.tar.gz | |
debugobjects: Use LD_WAIT_CONFIG instead of LD_WAIT_SLEEP
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>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Link: https://patch.msgid.link/20251127153652.291697-3-bigeasy@linutronix.de
| -rw-r--r-- | lib/debugobjects.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/debugobjects.c b/lib/debugobjects.c index 7017e5c8f32ddd..ecf8e7f978e30c 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); |
