lkml.org 
[lkml]   [2013]   [Feb]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] lockdep: Print more info when MAX_LOCK_DEPTH is exceeded.
Date
From: Ben Greear <greearb@candelatech.com>

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

Signed-off-by: Ben Greear <greearb@candelatech.com>
---
kernel/lockdep.c | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/kernel/lockdep.c b/kernel/lockdep.c
index 7981e5b..7e76b69 100644
--- a/kernel/lockdep.c
+++ b/kernel/lockdep.c
@@ -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;
--
1.7.3.4


\
 
 \ /
  Last update: 2013-02-06 20:41    [W:0.090 / U:0.504 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site