From: greearb@candelatech.com
To: netdev@vger.kernel.org
Cc: peterz@infradead.org, rostedt@goodmis.org, mingo@kernel.org,
Ben Greear <greearb@candelatech.com>
Subject: [PATCH] lockdep: Print more info when MAX_LOCK_DEPTH is exceeded.
Date: Wed, 6 Feb 2013 10:52:42 -0800 [thread overview]
Message-ID: <1360176762-4321-1-git-send-email-greearb@candelatech.com> (raw)
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
next reply other threads:[~2013-02-06 18:53 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-02-06 18:52 greearb [this message]
2013-02-06 18:55 ` [PATCH] lockdep: Print more info when MAX_LOCK_DEPTH is exceeded Ben Greear
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1360176762-4321-1-git-send-email-greearb@candelatech.com \
--to=greearb@candelatech.com \
--cc=mingo@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=peterz@infradead.org \
--cc=rostedt@goodmis.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).