]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blob - queue-5.0/powerpc-traps-fix-the-message-printed-when-stack-overflows.patch
Linux 4.19.31
[thirdparty/kernel/stable-queue.git] / queue-5.0 / powerpc-traps-fix-the-message-printed-when-stack-overflows.patch
1 From 9bf3d3c4e4fd82c7174f4856df372ab2a71005b9 Mon Sep 17 00:00:00 2001
2 From: Christophe Leroy <christophe.leroy@c-s.fr>
3 Date: Tue, 29 Jan 2019 16:37:55 +0000
4 Subject: powerpc/traps: Fix the message printed when stack overflows
5
6 From: Christophe Leroy <christophe.leroy@c-s.fr>
7
8 commit 9bf3d3c4e4fd82c7174f4856df372ab2a71005b9 upstream.
9
10 Today's message is useless:
11
12 [ 42.253267] Kernel stack overflow in process (ptrval), r1=c65500b0
13
14 This patch fixes it:
15
16 [ 66.905235] Kernel stack overflow in process sh[356], r1=c65560b0
17
18 Fixes: ad67b74d2469 ("printk: hash addresses printed with %p")
19 Cc: stable@vger.kernel.org # v4.15+
20 Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
21 [mpe: Use task_pid_nr()]
22 Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
23 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
24
25 ---
26 arch/powerpc/kernel/traps.c | 4 ++--
27 1 file changed, 2 insertions(+), 2 deletions(-)
28
29 --- a/arch/powerpc/kernel/traps.c
30 +++ b/arch/powerpc/kernel/traps.c
31 @@ -1542,8 +1542,8 @@ bail:
32
33 void StackOverflow(struct pt_regs *regs)
34 {
35 - printk(KERN_CRIT "Kernel stack overflow in process %p, r1=%lx\n",
36 - current, regs->gpr[1]);
37 + pr_crit("Kernel stack overflow in process %s[%d], r1=%lx\n",
38 + current->comm, task_pid_nr(current), regs->gpr[1]);
39 debugger(regs);
40 show_regs(regs);
41 panic("kernel stack overflow");