public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [Patch-next] Remove notify_die in do_machine_check functioin
@ 2010-05-27  2:40 Jin Dongming
  2010-05-27  3:21 ` Huang Ying
  2010-05-27  6:58 ` Andi Kleen
  0 siblings, 2 replies; 8+ messages in thread
From: Jin Dongming @ 2010-05-27  2:40 UTC (permalink / raw)
  To: LKLM; +Cc: Andi Kleen, Huang Ying, Hidetoshi Seto

This patch fixes do_machine_check() failure caused by DIE_NMI.

I do MCE tests on my machine. When I inject Uncorrected Error(UE) into
kernel, the messages of test failure are always gotten. This problem
is caused by the notification of DIE_NMI in the front of do_machine_check().
Because there are some notifications used DIE_NMI, and when they finish their
own work and return NOTIFY_STOP as a result. The result makes
do_machine_check() return at that time.

So we decide to delete the notification of DIE_NMI. It is because when UE error
happens, if one of the cpu is down caused by the error of hook function of
DIE_NMI, the error type of UE may be different with the real one. For example,

        CPU0                                  CPU1
UE      do_machine_check()                    do_machine_check()
        |                                     |
        cpu down(hook error of DIE_NMI)       cpu OK(no hook error of DIE_NMI)
                                              |
                                              wait CPU0 timeout
                                              |
                                              Fatal Error
                                              (Timeout synchronizing machine
                                               check over CPUs)

And I test this patch on x86_64. It works well.

Signed-off-by: Jin Dongming <jin.dongming@np.css.fujitsu.com>
Signed-off-by: Hidetoshi Seto <seto.hidetoshi@jp.fujitsu.com>
---
 arch/x86/kernel/cpu/mcheck/mce.c |    3 ---
 1 files changed, 0 insertions(+), 3 deletions(-)

diff --git a/arch/x86/kernel/cpu/mcheck/mce.c b/arch/x86/kernel/cpu/mcheck/mce.c
index 18cc425..5ed9df3 100644
--- a/arch/x86/kernel/cpu/mcheck/mce.c
+++ b/arch/x86/kernel/cpu/mcheck/mce.c
@@ -955,9 +955,6 @@ void do_machine_check(struct pt_regs *regs, long error_code)
 
 	percpu_inc(mce_exception_count);
 
-	if (notify_die(DIE_NMI, "machine check", regs, error_code,
-			   18, SIGKILL) == NOTIFY_STOP)
-		goto out;
 	if (!banks)
 		goto out;
 
-- 
1.7.0.3


^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2010-05-27 13:15 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-05-27  2:40 [Patch-next] Remove notify_die in do_machine_check functioin Jin Dongming
2010-05-27  3:21 ` Huang Ying
2010-05-27  6:06   ` Hidetoshi Seto
2010-05-27  6:57     ` Andi Kleen
2010-05-27  6:54   ` Andi Kleen
2010-05-27 11:04     ` Alan Cox
2010-05-27 13:15       ` Andi Kleen
2010-05-27  6:58 ` Andi Kleen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox