aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCorey Minyard <cminyard@mvista.com>2016-07-11 13:16:27 -0500
committerSteven Rostedt <rostedt@goodmis.org>2017-02-08 10:04:17 -0500
commit9fa654901f683d576ca0ff7e2380e72ad339cd03 (patch)
treece4daf9beefe42409b814990f544857016423a59
parent31495c663d5ee635700fd344cbf60e496627a9dd (diff)
downloadlinux-stable-rt-9fa654901f683d576ca0ff7e2380e72ad339cd03.tar.gz
x86: Fix an RT MCE crash
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. Suggested-by: Borislav Petkov <bp@alien8.de> Signed-off-by: Corey Minyard <cminyard@mvista.com> Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
-rw-r--r--arch/x86/kernel/cpu/mcheck/mce.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/x86/kernel/cpu/mcheck/mce.c b/arch/x86/kernel/cpu/mcheck/mce.c
index 3a7ab0b08cdf8b..9901b77ed819c7 100644
--- a/arch/x86/kernel/cpu/mcheck/mce.c
+++ b/arch/x86/kernel/cpu/mcheck/mce.c
@@ -1403,7 +1403,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)