Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1346290

[PATCH 2/3] ipmi/watchdog: Use nmi_panic() when kernel panics in NMI handler

From Hidehiro Kawai <hidehiro.kawai.ez@hitachi.com>
Newsgroups linux.kernel
Subject [PATCH 2/3] ipmi/watchdog: Use nmi_panic() when kernel panics in NMI handler
Date 2016-03-01 03:00 +0100
Message-ID <r7HLs-2tR-13@gated-at.bofh.it> (permalink)
References <r7HLs-2tR-15@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


commit 58c5661f2144 ("panic, x86: Allow CPUs to save registers even
if looping in NMI context") introduced nmi_panic() which prevents
concurrent/recursive execution of panic().  It also saves registers
for the crash dump on x86.

ipmi_watchdog driver can call panic() from NMI handler, so replace
it with nmi_panic().

Signed-off-by: Hidehiro Kawai <hidehiro.kawai.ez@hitachi.com>
Cc: Corey Minyard <minyard@acm.org>
Cc: openipmi-developer@lists.sourceforge.net
---
 drivers/char/ipmi/ipmi_watchdog.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/char/ipmi/ipmi_watchdog.c b/drivers/char/ipmi/ipmi_watchdog.c
index 096f0ce..4facc75 100644
--- a/drivers/char/ipmi/ipmi_watchdog.c
+++ b/drivers/char/ipmi/ipmi_watchdog.c
@@ -1140,7 +1140,7 @@ ipmi_nmi(unsigned int val, struct pt_regs *regs)
 		   the timer.   So do so. */
 		pretimeout_since_last_heartbeat = 1;
 		if (atomic_inc_and_test(&preop_panic_excl))
-			panic(PFX "pre-timeout");
+			nmi_panic(regs, PFX "pre-timeout");
 	}
 
 	return NMI_HANDLED;

Back to linux.kernel | Previous | NextNext in thread | Find similar | Unroll thread


Thread

[PATCH 2/3] ipmi/watchdog: Use nmi_panic() when kernel panics in  NMI handler Hidehiro Kawai <hidehiro.kawai.ez@hitachi.com> - 2016-03-01 03:00 +0100
  Re: [PATCH 2/3] ipmi/watchdog: Use nmi_panic() when kernel panics in  NMI handler Guenter Roeck <linux@roeck-us.net> - 2016-03-01 04:00 +0100
  Re: [PATCH 2/3] ipmi/watchdog: Use nmi_panic() when kernel panics in  NMI handler Corey Minyard <minyard@acm.org> - 2016-03-01 04:40 +0100
    RE: [PATCH 2/3] ipmi/watchdog: Use nmi_panic() when kernel panics  in NMI handler 河合英宏 / KAWAI,HIDEHIRO   <hidehiro.kawai.ez@hitachi.com> - 2016-03-01 05:30 +0100
      Re: [PATCH 2/3] ipmi/watchdog: Use nmi_panic() when kernel panics in  NMI handler Guenter Roeck <linux@roeck-us.net> - 2016-03-01 06:20 +0100
  Re: [PATCH 2/3] ipmi/watchdog: Use nmi_panic() when kernel panics in  NMI handler Michal Hocko <mhocko@kernel.org> - 2016-03-01 10:00 +0100

csiph-web