[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20061116140114.GA24392@elte.hu>
Date: Thu, 16 Nov 2006 15:01:14 +0100
From: Ingo Molnar <mingo@...e.hu>
To: Andrew Morton <akpm@...l.org>
Cc: linux-kernel@...r.kernel.org
Subject: Re: [patch] lockdep: show held locks when showing a stackdump
* Ingo Molnar <mingo@...e.hu> wrote:
> Subject: [patch] lockdep: show held locks when showing a stackdump
> From: Ingo Molnar <mingo@...e.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.
on x86_64 this also needs the patch below - NULL means 'current'.
Ingo
Index: linux/kernel/lockdep.c
===================================================================
--- linux.orig/kernel/lockdep.c
+++ linux/kernel/lockdep.c
@@ -395,7 +395,11 @@ static void print_lock(struct held_lock
static void lockdep_print_held_locks(struct task_struct *curr)
{
- int i, depth = curr->lockdep_depth;
+ int i, depth;
+
+ if (!curr)
+ curr = current;
+ depth = curr->lockdep_depth;
if (!depth) {
printk("no locks held by %s/%d.\n", curr->comm, curr->pid);
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists