[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20160301085017.GB9461@dhcp22.suse.cz>
Date: Tue, 1 Mar 2016 09:50:18 +0100
From: Michal Hocko <mhocko@...nel.org>
To: Hidehiro Kawai <hidehiro.kawai.ez@...achi.com>
Cc: Andrew Morton <akpm@...ux-foundation.org>,
Thomas Mingarelli <thomas.mingarelli@....com>,
Wim Van Sebroeck <wim@...ana.be>,
Corey Minyard <minyard@....org>,
openipmi-developer@...ts.sourceforge.net,
Borislav Petkov <bp@...en8.de>, linux-watchdog@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH 2/3] ipmi/watchdog: Use nmi_panic() when kernel panics in
NMI handler
On Tue 01-03-16 10:50:39, Hidehiro Kawai wrote:
> 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@...achi.com>
> Cc: Corey Minyard <minyard@....org>
> Cc: openipmi-developer@...ts.sourceforge.net
Reviewed-by: Michal Hocko <mhocko@...e.com>
> ---
> 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;
>
--
Michal Hocko
SUSE Labs
Powered by blists - more mailing lists