Skip to contentSkip to conversation

lockdep: show held locks when showing a stackdump

S390 Martin Schwidefsky 1 participant 1 message Dec 4, 2006 s390

lore
Share & tools
lore
#0 lore raw

From: Heiko Carstens <[email protected]>

[S390] lockdep: show held locks when showing a stackdump

Follow i386/x86_64:
lockdep can be used to print held locks when printing a backtrace. This can be useful when debugging things like 'scheduling while atomic' asserts.

---

 arch/s390/kernel/traps.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletion(-)
arch/s390/kernel/traps.c +4 -1
diff -urpN linux-2.6/arch/s390/kernel/traps.c linux-2.6-patched/arch/s390/kernel/traps.c
@@ -129,7 +129,7 @@ __show_trace(unsigned long sp, unsigned 
 	}
 }
 
-void show_trace(struct task_struct *task, unsigned long * stack)
+void show_trace(struct task_struct *task, unsigned long *stack)
 {
 	register unsigned long __r15 asm ("15");
 	unsigned long sp;
@@ -151,6 +151,9 @@ void show_trace(struct task_struct *task
 		__show_trace(sp, S390_lowcore.thread_info,
 			     S390_lowcore.thread_info + THREAD_SIZE);
 	printk("\n");
+	if (!task)
+		task = current;
+	debug_show_held_locks(task);
 }
 
 void show_stack(struct task_struct *task, unsigned long *sp)