提交 67d5ddc3 编写于 作者: C Christophe Leroy 提交者: Xie XiuQi

powerpc/traps: Fix the message printed when stack overflows

commit 9bf3d3c4e4fd82c7174f4856df372ab2a71005b9 upstream.

Today's message is useless:

  [   42.253267] Kernel stack overflow in process (ptrval), r1=c65500b0

This patch fixes it:

  [   66.905235] Kernel stack overflow in process sh[356], r1=c65560b0

Fixes: ad67b74d ("printk: hash addresses printed with %p")
Cc: stable@vger.kernel.org # v4.15+
Signed-off-by: NChristophe Leroy <christophe.leroy@c-s.fr>
[mpe: Use task_pid_nr()]
Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
上级 61cb60af
...@@ -1545,8 +1545,8 @@ void alignment_exception(struct pt_regs *regs) ...@@ -1545,8 +1545,8 @@ void alignment_exception(struct pt_regs *regs)
void StackOverflow(struct pt_regs *regs) void StackOverflow(struct pt_regs *regs)
{ {
printk(KERN_CRIT "Kernel stack overflow in process %p, r1=%lx\n", pr_crit("Kernel stack overflow in process %s[%d], r1=%lx\n",
current, regs->gpr[1]); current->comm, task_pid_nr(current), regs->gpr[1]);
debugger(regs); debugger(regs);
show_regs(regs); show_regs(regs);
panic("kernel stack overflow"); panic("kernel stack overflow");
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册