diff options
author | Greentime Hu <greentime@andestech.com> | 2018-08-23 14:47:43 +0800 |
---|---|---|
committer | Greentime Hu <greentime@andestech.com> | 2018-09-04 14:45:19 +0800 |
commit | 487c4b2323b26cfb5fd4d77d3605a92c182b6288 (patch) | |
tree | 988940583f5055284a7f12543d8385c72bc35fc3 /arch/nds32/kernel | |
parent | 95f93ed7fe92c16f5346e477491d91e4fa8e92b8 (diff) | |
download | linux-stable-487c4b2323b26cfb5fd4d77d3605a92c182b6288.tar.gz linux-stable-487c4b2323b26cfb5fd4d77d3605a92c182b6288.tar.bz2 linux-stable-487c4b2323b26cfb5fd4d77d3605a92c182b6288.zip |
nds32: Only print one page of stack when die to prevent printing too much information.
It may print too much information sometimes if the stack is wrong or
too big. This patch can limit the debug information in a page of stack.
Signed-off-by: Greentime Hu <greentime@andestech.com>
Diffstat (limited to 'arch/nds32/kernel')
-rw-r--r-- | arch/nds32/kernel/traps.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/arch/nds32/kernel/traps.c b/arch/nds32/kernel/traps.c index b0b85b7ab079..1496aab48998 100644 --- a/arch/nds32/kernel/traps.c +++ b/arch/nds32/kernel/traps.c @@ -173,11 +173,10 @@ void die(const char *str, struct pt_regs *regs, int err) pr_emerg("CPU: %i\n", smp_processor_id()); show_regs(regs); pr_emerg("Process %s (pid: %d, stack limit = 0x%p)\n", - tsk->comm, tsk->pid, task_thread_info(tsk) + 1); + tsk->comm, tsk->pid, end_of_stack(tsk)); if (!user_mode(regs) || in_interrupt()) { - dump_mem("Stack: ", regs->sp, - THREAD_SIZE + (unsigned long)task_thread_info(tsk)); + dump_mem("Stack: ", regs->sp, (regs->sp + PAGE_SIZE) & PAGE_MASK); dump_instr(regs); dump_stack(); } |