]> Pileus Git - ~andy/linux/blobdiff - arch/x86/kernel/dumpstack.c
Merge tag 'pm+acpi-3.12-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael...
[~andy/linux] / arch / x86 / kernel / dumpstack.c
index c8797d55b24546eb7b3ea4abaeffe89d826d7655..deb6421c9e69d6cae32422e99fd6b77477762707 100644 (file)
@@ -176,26 +176,20 @@ void show_trace(struct task_struct *task, struct pt_regs *regs,
 
 void show_stack(struct task_struct *task, unsigned long *sp)
 {
-       show_stack_log_lvl(task, NULL, sp, 0, "");
-}
-
-/*
- * The architecture-independent dump_stack generator
- */
-void dump_stack(void)
-{
-       unsigned long bp;
+       unsigned long bp = 0;
        unsigned long stack;
 
-       bp = stack_frame(current, NULL);
-       printk("Pid: %d, comm: %.20s %s %s %.*s\n",
-               current->pid, current->comm, print_tainted(),
-               init_utsname()->release,
-               (int)strcspn(init_utsname()->version, " "),
-               init_utsname()->version);
-       show_trace(NULL, NULL, &stack, bp);
+       /*
+        * Stack frames below this one aren't interesting.  Don't show them
+        * if we're printing for %current.
+        */
+       if (!sp && (!task || task == current)) {
+               sp = &stack;
+               bp = stack_frame(current, NULL);
+       }
+
+       show_stack_log_lvl(task, NULL, sp, bp, "");
 }
-EXPORT_SYMBOL(dump_stack);
 
 static arch_spinlock_t die_lock = __ARCH_SPIN_LOCK_UNLOCKED;
 static int die_owner = -1;