Skip to content

Commit 9cd2087

Browse files
Sebastian Andrzej Siewiorgregkh
authored andcommitted
debugobjects: Use LD_WAIT_CONFIG instead of LD_WAIT_SLEEP
commit 37de2db upstream. 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 Signed-off-by: Sasha Levin <sashal@kernel.org>
1 parent a460935 commit 9cd2087

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

lib/debugobjects.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -734,10 +734,10 @@ static void debug_objects_fill_pool(void)
734734
if (!IS_ENABLED(CONFIG_PREEMPT_RT) || preemptible() || system_state < SYSTEM_SCHEDULING) {
735735
/*
736736
* Annotate away the spinlock_t inside raw_spinlock_t warning
737-
* by temporarily raising the wait-type to WAIT_SLEEP, matching
737+
* by temporarily raising the wait-type to LD_WAIT_CONFIG, matching
738738
* the preemptible() condition above.
739739
*/
740-
static DEFINE_WAIT_OVERRIDE_MAP(fill_pool_map, LD_WAIT_SLEEP);
740+
static DEFINE_WAIT_OVERRIDE_MAP(fill_pool_map, LD_WAIT_CONFIG);
741741
lock_map_acquire_try(&fill_pool_map);
742742
fill_pool();
743743
lock_map_release(&fill_pool_map);

0 commit comments

Comments
 (0)