]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
powerpc/watchdog: regs can't be null in soft_nmi_interrupt()
authorMichael Ellerman <mpe@ellerman.id.au>
Thu, 12 Oct 2017 04:44:33 +0000 (15:44 +1100)
committerMichael Ellerman <mpe@ellerman.id.au>
Sun, 28 Jan 2018 06:08:28 +0000 (17:08 +1100)
soft_nmi_interrupt() is called directly from the asm exception
handling code, which passes regs as a pointer to the stack. So regs
can't be NULL, it may be full of junk, but that's a separate problem.

Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
arch/powerpc/kernel/watchdog.c

index c00baea616ba56f5f98c48eb745f2bf70c403243..80a467eb532afdab2d0efe0abf47959f294d610f 100644 (file)
@@ -257,10 +257,7 @@ void soft_nmi_interrupt(struct pt_regs *regs)
                pr_emerg("CPU %d self-detected hard LOCKUP\n", cpu);
                print_modules();
                print_irqtrace_events(current);
-               if (regs)
-                       show_regs(regs);
-               else
-                       dump_stack();
+               show_regs(regs);
 
                wd_smp_unlock(&flags);