Merge branch 'x86-headers-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
[linux-2.6-block.git] / arch / x86 / kernel / dumpstack_32.c
index fef917e79b9d614eeaca609c9c03e980bae2272f..09675712eba807a8470962c53102ad1e7dc32afa 100644 (file)
@@ -7,7 +7,7 @@
 #include <linux/uaccess.h>
 #include <linux/hardirq.h>
 #include <linux/kdebug.h>
-#include <linux/module.h>
+#include <linux/export.h>
 #include <linux/ptrace.h>
 #include <linux/kexec.h>
 #include <linux/sysfs.h>
@@ -96,7 +96,9 @@ show_stack_log_lvl(struct task_struct *task, struct pt_regs *regs,
        int i;
 
        if (sp == NULL) {
-               if (task)
+               if (regs)
+                       sp = (unsigned long *)regs->sp;
+               else if (task)
                        sp = (unsigned long *)task->thread.sp;
                else
                        sp = (unsigned long *)&sp;