* [PATCH] lockdep: Print more info when MAX_LOCK_DEPTH is exceeded.
@ 2013-02-06 18:52 greearb
2013-02-06 18:55 ` Ben Greear
0 siblings, 1 reply; 2+ messages in thread
From: greearb @ 2013-02-06 18:52 UTC (permalink / raw)
To: netdev; +Cc: peterz, rostedt, mingo, Ben Greear
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
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] lockdep: Print more info when MAX_LOCK_DEPTH is exceeded.
2013-02-06 18:52 [PATCH] lockdep: Print more info when MAX_LOCK_DEPTH is exceeded greearb
@ 2013-02-06 18:55 ` Ben Greear
0 siblings, 0 replies; 2+ messages in thread
From: Ben Greear @ 2013-02-06 18:55 UTC (permalink / raw)
Cc: netdev
On 02/06/2013 10:52 AM, greearb@candelatech.com wrote:
> From: Ben Greear <greearb@candelatech.com>
>
> 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
--
Ben Greear <greearb@candelatech.com>
Candela Technologies Inc http://www.candelatech.com
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-02-06 18:55 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-02-06 18:52 [PATCH] lockdep: Print more info when MAX_LOCK_DEPTH is exceeded greearb
2013-02-06 18:55 ` Ben Greear
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).