Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 85684873 authored by Ingo Molnar's avatar Ingo Molnar
Browse files

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: default avatarIngo Molnar <mingo@elte.hu>
Signed-off-by: default avatarPeter Zijlstra <a.p.zijlstra@chello.nl>
parent 41a2d6cf
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -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)