Commit 73cbf4a1 authored by Hidehiro Kawai's avatar Hidehiro Kawai Committed by Linus Torvalds

ipmi/watchdog: use nmi_panic() when kernel panics in NMI handler

Commit 1717f209 ("panic, x86: Fix re-entrance problem due to panic
on NMI") introduced nmi_panic() which prevents concurrent and recursive
execution of panic().  It also saves registers for the crash dump on x86
by later commit 58c5661f ("panic, x86: Allow CPUs to save registers
even if looping in NMI context").

ipmi_watchdog driver can call panic() from NMI handler, so replace it
with nmi_panic().
Signed-off-by: default avatarHidehiro Kawai <hidehiro.kawai.ez@hitachi.com>
Acked-by: default avatarCorey Minyard <cminyard@mvista.com>
Acked-by: default avatarGuenter Roeck <linux@roeck-us.net>
Reviewed-by: default avatarMichal Hocko <mhocko@suse.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent ebc41f20
...@@ -1140,7 +1140,7 @@ ipmi_nmi(unsigned int val, struct pt_regs *regs) ...@@ -1140,7 +1140,7 @@ ipmi_nmi(unsigned int val, struct pt_regs *regs)
the timer. So do so. */ the timer. So do so. */
pretimeout_since_last_heartbeat = 1; pretimeout_since_last_heartbeat = 1;
if (atomic_inc_and_test(&preop_panic_excl)) if (atomic_inc_and_test(&preop_panic_excl))
panic(PFX "pre-timeout"); nmi_panic(regs, PFX "pre-timeout");
} }
return NMI_HANDLED; return NMI_HANDLED;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment