RE: [V3 PATCH 1/4] panic/x86: Fix re-entrance problem due to panic on NMI

2015-08-21 Thread 河合英宏 / KAWAI,HIDEHIRO
> From: Peter Zijlstra [mailto:pet...@infradead.org] > > On Thu, Aug 06, 2015 at 02:45:43PM +0900, Hidehiro Kawai wrote: > > diff --git a/arch/x86/kernel/nmi.c b/arch/x86/kernel/nmi.c > > index d05bd2e..dcd4038 100644 > > --- a/arch/x86/kernel/nmi.c > > +++ b/arch/x86/kernel/nmi.c > > @@ -231,7

RE: [V3 PATCH 1/4] panic/x86: Fix re-entrance problem due to panic on NMI

2015-08-21 Thread 河合英宏 / KAWAI,HIDEHIRO
From: Peter Zijlstra [mailto:pet...@infradead.org] On Thu, Aug 06, 2015 at 02:45:43PM +0900, Hidehiro Kawai wrote: diff --git a/arch/x86/kernel/nmi.c b/arch/x86/kernel/nmi.c index d05bd2e..dcd4038 100644 --- a/arch/x86/kernel/nmi.c +++ b/arch/x86/kernel/nmi.c @@ -231,7 +231,7 @@ void

Re: [V3 PATCH 1/4] panic/x86: Fix re-entrance problem due to panic on NMI

2015-08-20 Thread Peter Zijlstra
On Thu, Aug 06, 2015 at 02:45:43PM +0900, Hidehiro Kawai wrote: > diff --git a/arch/x86/kernel/nmi.c b/arch/x86/kernel/nmi.c > index d05bd2e..dcd4038 100644 > --- a/arch/x86/kernel/nmi.c > +++ b/arch/x86/kernel/nmi.c > @@ -231,7 +231,7 @@ void unregister_nmi_handler(unsigned int type, const char

Re: [V3 PATCH 1/4] panic/x86: Fix re-entrance problem due to panic on NMI

2015-08-20 Thread Peter Zijlstra
On Thu, Aug 06, 2015 at 02:45:43PM +0900, Hidehiro Kawai wrote: diff --git a/arch/x86/kernel/nmi.c b/arch/x86/kernel/nmi.c index d05bd2e..dcd4038 100644 --- a/arch/x86/kernel/nmi.c +++ b/arch/x86/kernel/nmi.c @@ -231,7 +231,7 @@ void unregister_nmi_handler(unsigned int type, const char

[V3 PATCH 1/4] panic/x86: Fix re-entrance problem due to panic on NMI

2015-08-05 Thread Hidehiro Kawai
If panic on NMI happens just after panic() on the same CPU, panic() is recursively called. As the result, it stalls after failing to acquire panic_lock. To avoid this problem, don't call panic() in NMI context if we've already entered panic(). V3: - Introduce nmi_panic() macro to reduce code

[V3 PATCH 1/4] panic/x86: Fix re-entrance problem due to panic on NMI

2015-08-05 Thread Hidehiro Kawai
If panic on NMI happens just after panic() on the same CPU, panic() is recursively called. As the result, it stalls after failing to acquire panic_lock. To avoid this problem, don't call panic() in NMI context if we've already entered panic(). V3: - Introduce nmi_panic() macro to reduce code