diff options
author | Michael Ellerman <mpe@ellerman.id.au> | 2017-10-12 00:44:33 -0400 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2018-01-28 01:08:28 -0500 |
commit | 3ba45b7e46e2ae7c059f3335120aed5e2c749bd9 (patch) | |
tree | cdc8dd2bd3b3b0ed509df8eb0b99e180c516d499 | |
parent | d8fa82e0e2b1ad9c66aa76810615ad389b414d44 (diff) |
powerpc/watchdog: regs can't be null in soft_nmi_interrupt()
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>
-rw-r--r-- | arch/powerpc/kernel/watchdog.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/arch/powerpc/kernel/watchdog.c b/arch/powerpc/kernel/watchdog.c index c00baea616ba..80a467eb532a 100644 --- a/arch/powerpc/kernel/watchdog.c +++ b/arch/powerpc/kernel/watchdog.c | |||
@@ -257,10 +257,7 @@ void soft_nmi_interrupt(struct pt_regs *regs) | |||
257 | pr_emerg("CPU %d self-detected hard LOCKUP\n", cpu); | 257 | pr_emerg("CPU %d self-detected hard LOCKUP\n", cpu); |
258 | print_modules(); | 258 | print_modules(); |
259 | print_irqtrace_events(current); | 259 | print_irqtrace_events(current); |
260 | if (regs) | 260 | show_regs(regs); |
261 | show_regs(regs); | ||
262 | else | ||
263 | dump_stack(); | ||
264 | 261 | ||
265 | wd_smp_unlock(&flags); | 262 | wd_smp_unlock(&flags); |
266 | 263 | ||