Skip to contentSkip to conversation

lockdep: Print more info when MAX_LOCK_DEPTH is exceeded.

PATCH In review [email protected] 1 participant 2 messages Feb 6, 2013

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 lockdep: Print more info when MAX_LOCK_DEPTH is exceeded.

From: Ben Greear <[email protected]>

This helps debug cases where a lock is acquired over and over without being released.

---
 kernel/lockdep.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)
kernel/lockdep.c +5 -1
index 7981e5b..7e76b69 100644
@@ -3189,8 +3189,12 @@ static int __lock_acquire(struct lockdep_map *lock, unsigned int subclass,
 		return 0;
 #endif
 	if (unlikely(curr->lockdep_depth >= MAX_LOCK_DEPTH)) {
+		debug_show_all_locks();
+		lockdep_print_held_locks(current);
+
 		debug_locks_off();
-		printk("BUG: MAX_LOCK_DEPTH too low!\n");
+		printk("BUG: MAX_LOCK_DEPTH too low, depth: %i  max: %lu!\n",
+		       curr->lockdep_depth, MAX_LOCK_DEPTH);
 		printk("turning off the locking correctness validator.\n");
 		dump_stack();
 		return 0;
Signature · 1 line
1.7.3.4
author
#1 lore raw
Quoted 5 lines · On 02/06/2013 10:52 AM, [email protected] wrote:

From: Ben Greear <[email protected]>

This helps debug cases where a lock is acquired over and over without being released.

Bleh, this should have gone to linux-kernel....fingers too used to typing netdev...

Ben

Signature · 2 lines
Ben Greear <[email protected]>
Candela Technologies Inc  http://www.candelatech.com