diff options
Diffstat (limited to 'arch/sparc64/kernel/traps.c')
-rw-r--r-- | arch/sparc64/kernel/traps.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/arch/sparc64/kernel/traps.c b/arch/sparc64/kernel/traps.c index 404e8561e2d0..3d924121c796 100644 --- a/arch/sparc64/kernel/traps.c +++ b/arch/sparc64/kernel/traps.c | |||
@@ -39,6 +39,7 @@ | |||
39 | #include <asm/prom.h> | 39 | #include <asm/prom.h> |
40 | 40 | ||
41 | #include "entry.h" | 41 | #include "entry.h" |
42 | #include "kstack.h" | ||
42 | 43 | ||
43 | /* When an irrecoverable trap occurs at tl > 0, the trap entry | 44 | /* When an irrecoverable trap occurs at tl > 0, the trap entry |
44 | * code logs the trap state registers at every level in the trap | 45 | * code logs the trap state registers at every level in the trap |
@@ -2115,14 +2116,12 @@ void show_stack(struct task_struct *tsk, unsigned long *_ksp) | |||
2115 | struct pt_regs *regs; | 2116 | struct pt_regs *regs; |
2116 | unsigned long pc; | 2117 | unsigned long pc; |
2117 | 2118 | ||
2118 | /* Bogus frame pointer? */ | 2119 | if (!kstack_valid(tp, fp)) |
2119 | if (fp < (thread_base + sizeof(struct thread_info)) || | ||
2120 | fp >= (thread_base + THREAD_SIZE)) | ||
2121 | break; | 2120 | break; |
2122 | sf = (struct sparc_stackf *) fp; | 2121 | sf = (struct sparc_stackf *) fp; |
2123 | regs = (struct pt_regs *) (sf + 1); | 2122 | regs = (struct pt_regs *) (sf + 1); |
2124 | 2123 | ||
2125 | if ((regs->magic & ~0x1ff) == PT_REGS_MAGIC) { | 2124 | if (kstack_is_trap_frame(tp, regs)) { |
2126 | if (!(regs->tstate & TSTATE_PRIV)) | 2125 | if (!(regs->tstate & TSTATE_PRIV)) |
2127 | break; | 2126 | break; |
2128 | pc = regs->tpc; | 2127 | pc = regs->tpc; |