From: Ingo Molnar Add CONFIG_DEBUG_NON_NESTED_UNLOCKS: if enabled then a non-alarming message about out of order unlocks is printed. If disabled then we fall back to the non-nested unlock method automatically, without printing a message and stopping the validator. Defaults to disabled. Tested with the option both on and off. Signed-off-by: Ingo Molnar Signed-off-by: Andrew Morton --- lib/Kconfig.debug | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff -puN lib/Kconfig.debug~lock-validator-enable-lock-validator-in-kconfig-add-config_debug_non_nested_unlocks-kconfig lib/Kconfig.debug --- devel/lib/Kconfig.debug~lock-validator-enable-lock-validator-in-kconfig-add-config_debug_non_nested_unlocks-kconfig 2006-06-09 15:18:43.000000000 -0700 +++ devel-akpm/lib/Kconfig.debug 2006-06-09 15:18:43.000000000 -0700 @@ -317,6 +317,19 @@ config LOCKDEP default y depends on PROVE_SPIN_LOCKING || PROVE_RW_LOCKING || PROVE_MUTEX_LOCKING || PROVE_RWSEM_LOCKING +config DEBUG_NON_NESTED_UNLOCKS + bool "Detect non-nested unlocks" + depends on LOCKDEP + help + If you say Y here, the lock dependency engine will do + additional runtime checks to detect and print non-nested + unlocks. + Non-nested unlocks are valid uses of the kernel's locking + APIs, but they cause more overhead for the validator, and + they can also be a sign for locking bugs or suboptimal + locking, so it's not a bad idea to annotate and thus + document those places. + config DEBUG_LOCKDEP bool "Lock dependency engine debugging" depends on LOCKDEP _