From f3d691136130bae8472f21570e9eb3600381f8fa Mon Sep 17 00:00:00 2001 From: Ingo Molnar Date: Wed, 5 Dec 2007 15:46:09 +0100 Subject: [PATCH] --- yaml --- r: 74648 b: refs/heads/master c: 856848737bd944c1db3ce0a66bbf67e56bd6f77d h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/kernel/lockdep.c | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index 989b92781a65..3307ef928a96 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 41a2d6cfa3f77ec469e7e5f06b4d7ffd031f9c0e +refs/heads/master: 856848737bd944c1db3ce0a66bbf67e56bd6f77d diff --git a/trunk/kernel/lockdep.c b/trunk/kernel/lockdep.c index ed38bbfc48a3..7e2ca7c9d99c 100644 --- a/trunk/kernel/lockdep.c +++ b/trunk/kernel/lockdep.c @@ -3173,6 +3173,13 @@ void debug_show_all_locks(void) printk(" locked it.\n"); do_each_thread(g, p) { + /* + * It's not reliable to print a task's held locks + * if it's not sleeping (or if it's not the current + * task): + */ + if (p->state == TASK_RUNNING && p != current) + continue; if (p->lockdep_depth) lockdep_print_held_locks(p); if (!unlock)