From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756573AbcGLRA0 (ORCPT ); Tue, 12 Jul 2016 13:00:26 -0400 Received: from mail.kernel.org ([198.145.29.136]:45330 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753610AbcGLQ6H (ORCPT ); Tue, 12 Jul 2016 12:58:07 -0400 Message-Id: <20160712165802.938737832@goodmis.org> User-Agent: quilt/0.61-1 Date: Tue, 12 Jul 2016 12:57:56 -0400 From: Steven Rostedt To: linux-kernel@vger.kernel.org, linux-rt-users Cc: Thomas Gleixner , Carsten Emde , Sebastian Andrzej Siewior , John Kacur , Paul Gortmaker , Borislav Petkov , Corey Minyard Subject: [PATCH RT 7/8] x86: Fix an RT MCE crash References: <20160712165749.741663758@goodmis.org> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-15 Content-Disposition: inline; filename=0007-x86-Fix-an-RT-MCE-crash.patch Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 3.10.102-rt113-rc1 stable review patch. If anyone has any objections, please let me know. ------------------ From: Corey Minyard 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 Signed-off-by: Corey Minyard Signed-off-by: Steven Rostedt --- arch/x86/kernel/cpu/mcheck/mce.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/x86/kernel/cpu/mcheck/mce.c b/arch/x86/kernel/cpu/mcheck/mce.c index aaf4b9b94f38..cc70d98a30f6 100644 --- a/arch/x86/kernel/cpu/mcheck/mce.c +++ b/arch/x86/kernel/cpu/mcheck/mce.c @@ -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) -- 2.8.1