summaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/dumpstack_64.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2016-07-26 03:18:04 +0200
committerLinus Torvalds <torvalds@linux-foundation.org>2016-07-26 03:18:04 +0200
commit36e635cb21d96da0f30b91a39cc95ef4ed1bce26 (patch)
treec28397756f579bbd23f1570ca612772c02cfbab2 /arch/x86/kernel/dumpstack_64.c
parentMerge branch 'x86-cleanups-for-linus' of git://git.kernel.org/pub/scm/linux/k... (diff)
parentx86/dumpstack: Add show_stack_regs() and use it (diff)
downloadlinux-36e635cb21d96da0f30b91a39cc95ef4ed1bce26.tar.xz
linux-36e635cb21d96da0f30b91a39cc95ef4ed1bce26.zip
Merge branch 'x86-debug-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull x86 stackdump update from Ingo Molnar: "A number of stackdump enhancements" * 'x86-debug-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/dumpstack: Add show_stack_regs() and use it printk: Make the printk*once() variants return a value x86/dumpstack: Honor supplied @regs arg
Diffstat (limited to 'arch/x86/kernel/dumpstack_64.c')
-rw-r--r--arch/x86/kernel/dumpstack_64.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/arch/x86/kernel/dumpstack_64.c b/arch/x86/kernel/dumpstack_64.c
index 2552a1eadfed..6dede08dd98b 100644
--- a/arch/x86/kernel/dumpstack_64.c
+++ b/arch/x86/kernel/dumpstack_64.c
@@ -264,7 +264,9 @@ show_stack_log_lvl(struct task_struct *task, struct pt_regs *regs,
* back trace for this cpu:
*/
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;