Skip to contentSkip to conversation

lockdep: make PROVE_RAW_LOCK_NESTING depend on PREEMPT_RT

PATCH New Chen Jun 1 participant 1 message Jun 16, 2022 Library code

lore
Share & tools
lore

Chen Jun

author
#0 lore raw

PATCH 1/1 lockdep: make PROVE_RAW_LOCK_NESTING depend on PREEMPT_RT

CONFIG_PROVE_RAW_LOCK_NESTING is used to check two things.
1. calling spin_lock in hardirq.
2. raw_spinlock - spinlock nesting.
The error messages like below:

[   13.485711] [ BUG: Invalid wait context ]

However there is no problem on non-PREEMPT_RT kernel. The messages may be confusing and disturbing.

Therefore, do not check raw_spinlock - spinlock nesting on non-PREEMPT_RT kernel.

---
 lib/Kconfig.debug | 1 +
 1 file changed, 1 insertion(+)
lib/Kconfig.debug +1 -0
index bd90664a2783..163d3a6606f3 100644
@@ -1227,6 +1227,7 @@ config PROVE_LOCKING
 config PROVE_RAW_LOCK_NESTING
 	bool "Enable raw_spinlock - spinlock nesting checks"
 	depends on PROVE_LOCKING
+	depends on PREEMPT_RT
 	default n
 	help
 	 Enable the raw_spinlock vs. spinlock nesting checks which ensure
Signature · 1 line
2.17.1