Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=856848737bd944c1db3ce0a66bbf67e56bd6f77d Commit: 856848737bd944c1db3ce0a66bbf67e56bd6f77d Parent: 41a2d6cfa3f77ec469e7e5f06b4d7ffd031f9c0e Author: Ingo Molnar <[EMAIL PROTECTED]> AuthorDate: Wed Dec 5 15:46:09 2007 +0100 Committer: Ingo Molnar <[EMAIL PROTECTED]> CommitDate: Wed Dec 5 15:46:09 2007 +0100
lockdep: fix debug_show_all_locks() fix the oops that can be seen in: http://bugzilla.kernel.org/attachment.cgi?id=13828&action=view it is not safe to print the locks of running tasks. (even with this fix we have a small race - but this is a debug function after all.) Signed-off-by: Ingo Molnar <[EMAIL PROTECTED]> Signed-off-by: Peter Zijlstra <[EMAIL PROTECTED]> --- kernel/lockdep.c | 7 +++++++ 1 files changed, 7 insertions(+), 0 deletions(-) diff --git a/kernel/lockdep.c b/kernel/lockdep.c index ed38bbf..7e2ca7c 100644 --- a/kernel/lockdep.c +++ b/kernel/lockdep.c @@ -3173,6 +3173,13 @@ retry: 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) - To unsubscribe from this list: send the line "unsubscribe git-commits-head" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html