From: Hidehiro Kawai <hidehiro.kawai.ez@hitachi.com>
To: Andrew Morton <akpm@linux-foundation.org>,
Thomas Mingarelli <thomas.mingarelli@hpe.com>,
Wim Van Sebroeck <wim@iguana.be>, Corey Minyard <minyard@acm.org>
Cc: Corey Minyard <cminyard@mvista.com>,
Michal Hocko <mhocko@suse.com>,
linux-watchdog@vger.kernel.org, linux-kernel@vger.kernel.org,
Michal Hocko <mhocko@kernel.org>, Borislav Petkov <bp@alien8.de>,
openipmi-developer@lists.sourceforge.net,
Guenter Roeck <linux@roeck-us.net>
Subject: [v3 PATCH 2/3] ipmi/watchdog: Use nmi_panic() when kernel panics in NMI handler
Date: Thu, 03 Mar 2016 19:57:46 +0900 [thread overview]
Message-ID: <20160303105746.4587.74644.stgit@softrs> (raw)
In-Reply-To: <20160303105741.4587.49047.stgit@softrs>
commit 1717f2096b54 ("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 58c5661f2144 ("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: Hidehiro Kawai <hidehiro.kawai.ez@hitachi.com>
Acked-by: Corey Minyard <cminyard@mvista.com>
Acked-by: Guenter Roeck <linux@roeck-us.net>
Reviewed-by: Michal Hocko <mhocko@suse.com>
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;
next prev parent reply other threads:[~2016-03-03 11:03 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-03 10:57 [v3 PATCH 0/3] Use nmi_panic() in panic on NMI case Hidehiro Kawai
2016-03-03 10:57 ` [v3 PATCH 1/3] panic: Change nmi_panic from macro to function Hidehiro Kawai
2016-03-03 13:14 ` Borislav Petkov
2016-03-07 10:53 ` 河合英宏 / KAWAI,HIDEHIRO
2016-03-07 11:13 ` Borislav Petkov
2016-03-07 11:13 ` Borislav Petkov
2016-03-04 17:49 ` Michal Hocko
2016-03-04 19:27 ` Michal Nazarewicz
2016-03-04 19:27 ` Michal Nazarewicz
2016-03-03 10:57 ` Hidehiro Kawai [this message]
2016-03-03 10:57 ` [v3 PATCH 3/3] hpwdt: Use nmi_panic() when kernel panics in NMI handler Hidehiro Kawai
2016-03-03 12:17 ` Guenter Roeck
2016-03-07 11:07 ` [Openipmi-developer] " 河合英宏 / KAWAI,HIDEHIRO
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20160303105746.4587.74644.stgit@softrs \
--to=hidehiro.kawai.ez@hitachi.com \
--cc=akpm@linux-foundation.org \
--cc=bp@alien8.de \
--cc=cminyard@mvista.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-watchdog@vger.kernel.org \
--cc=linux@roeck-us.net \
--cc=mhocko@kernel.org \
--cc=mhocko@suse.com \
--cc=minyard@acm.org \
--cc=openipmi-developer@lists.sourceforge.net \
--cc=thomas.mingarelli@hpe.com \
--cc=wim@iguana.be \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.