Skip to contentSkip to conversation

x86: Fix an RT MCE crash

PATCH New [email protected] 1 participant 1 message Jul 11, 2016 x86

lore
Share & tools
lore
#0 lore raw

PATCH v3 1/1 x86: Fix an RT MCE crash

From: Corey Minyard <[email protected]>

On some x86 systems an MCE interrupt would come in before the kernel was ready for it. Looking at the latest RT code, it has similar (but not quite the same) code, except it adds a bool that tells if MCE handling is initialized. That was required because they had switched to use swork instead of a kernel thread. Here, just checking to see if the thread is NULL is good enough to see if MCE handling is initialized.

---
 arch/x86/kernel/cpu/mcheck/mce.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Added Suggested-by: for Boris.

arch/x86/kernel/cpu/mcheck/mce.c +2 -1
index aaf4b9b..cc70d98 100644
@@ -1391,7 +1391,8 @@ static int mce_notify_work_init(void)
 
 static void mce_notify_work(void)
 {
-	wake_up_process(mce_notify_helper);
+	if (mce_notify_helper)
+		wake_up_process(mce_notify_helper);
 }
 #else
 static void mce_notify_work(void)
Signature · 1 line
2.7.4