From: Ingo Molnar <mingo@elte.hu>
To: Andrew Morton <akpm@osdl.org>
Cc: linux-kernel@vger.kernel.org
Subject: [patch] lockdep: show held locks when showing a stackdump
Date: Thu, 16 Nov 2006 11:08:52 +0100 [thread overview]
Message-ID: <20061116100852.GA5864@elte.hu> (raw)
Subject: [patch] lockdep: show held locks when showing a stackdump
From: Ingo Molnar <mingo@elte.hu>
lockdep can be used to print held locks when printing a
backtrace. This can be useful when debugging things like
'scheduling while atomic' asserts.
Signed-off-by: Ingo Molnar <mingo@elte.hu>
---
arch/i386/kernel/traps.c | 1 +
arch/x86_64/kernel/traps.c | 1 +
2 files changed, 2 insertions(+)
Index: linux/arch/i386/kernel/traps.c
===================================================================
--- linux.orig/arch/i386/kernel/traps.c
+++ linux/arch/i386/kernel/traps.c
@@ -318,6 +318,7 @@ static void show_stack_log_lvl(struct ta
}
printk("\n%sCall Trace:\n", log_lvl);
show_trace_log_lvl(task, regs, esp, log_lvl);
+ debug_show_held_locks(task);
}
void show_stack(struct task_struct *task, unsigned long *esp)
Index: linux/arch/x86_64/kernel/traps.c
===================================================================
--- linux.orig/arch/x86_64/kernel/traps.c
+++ linux/arch/x86_64/kernel/traps.c
@@ -405,6 +405,7 @@ show_trace(struct task_struct *tsk, stru
printk("\nCall Trace:\n");
dump_trace(tsk, regs, stack, &print_trace_ops, NULL);
printk("\n");
+ debug_show_held_locks(tsk);
}
static void
next reply other threads:[~2006-11-16 10:10 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-11-16 10:08 Ingo Molnar [this message]
2006-11-16 14:01 ` Ingo Molnar
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=20061116100852.GA5864@elte.hu \
--to=mingo@elte.hu \
--cc=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.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
all inboxes | Powered by JetHome®