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: [v2 PATCH 2/3] ipmi/watchdog: Use nmi_panic() when kernel panics in NMI handler
Date: Wed, 02 Mar 2016 19:36:29 +0900 [thread overview]
Message-ID: <20160302103629.5058.60500.stgit@softrs> (raw)
In-Reply-To: <20160302103624.5058.35844.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-02 10:42 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-02 10:36 [v2 PATCH 0/3] Use nmi_panic() in panic on NMI case Hidehiro Kawai
2016-03-02 10:36 ` [v2 PATCH 1/3] panic: Change nmi_panic from macro to function Hidehiro Kawai
2016-03-02 13:18 ` Michal Hocko
2016-03-02 13:22 ` Borislav Petkov
2016-03-03 1:28 ` 河合英宏 / KAWAI,HIDEHIRO
2016-03-02 17:03 ` Guenter Roeck
2016-03-02 10:36 ` Hidehiro Kawai [this message]
2016-03-02 10:36 ` [v2 PATCH 3/3] hpwdt: Use nmi_panic() when kernel panics in NMI handler Hidehiro Kawai
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=20160302103629.5058.60500.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).