Re: [PATCH][RT] x86: Fix an RT MCE crash
From: Daniel Wagner <hidden>
Date: 2016-07-01 09:26:56
On 06/30/2016 06:01 PM, Borislav Petkov wrote:
quoted
quoted
quoted
quoted
#ifdef CONFIG_PREEMPT_RT_FULL +static bool notify_work_ready __read_mostly; struct task_struct *mce_notify_helper; static int mce_notify_helper_thread(void *unused)@@ -1386,12 +1387,14 @@ static int mce_notify_work_init(void)Hmm, what is mce_notify_work_init() ? This must be some RT-homegrown thing. What it is supposed to do? Upstream is much different from 3.10 or whatever that kernel version is.
The notify work snippet defers the execution of mce_notify_irq to a kthread using swork (simple work, which is based on simple wait [1]). mce_notify_irq() can't be run in IRQ context because of wake_up_interruptible() which calls mutex_lock() eventually with CONFIG_PREEMPT_RT_FULL. cheers, daniel [1] https://git.kernel.org/cgit/linux/kernel/git/rt/linux-rt-devel.git/tree/include/linux/swork.h?h=linux-4.6.y-rt https://git.kernel.org/cgit/linux/kernel/git/rt/linux-rt-devel.git/tree/kernel/sched/swork.c?h=linux-4.6.y-rt