diff --git a/kernel/lockdep.c b/kernel/lockdep.c
index ed38bbfc48a3b84d4b290423d2443b2f32ff331c..7e2ca7c9d99c242ea249f9f99c18531a6c97b5a3 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)