summaryrefslogtreecommitdiff
path: root/arch/x86/kernel/cpu/mce/core.c
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2020-03-05 00:52:41 +0100
committerThomas Gleixner <tglx@linutronix.de>2020-05-19 15:51:19 +0200
commitb052df3da821adfd6be26a6eb16624fb50e90e56 (patch)
treed38f493f80df3e2c355ffe256b34e54962b6a3fd /arch/x86/kernel/cpu/mce/core.c
parentf93524eb9c54f49be150167918f6546b0a2e09b1 (diff)
x86/entry: Get rid of ist_begin/end_non_atomic()
This is completely overengineered and definitely not an interface which should be made available to anything else than this particular MCE case. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Reviewed-by: Alexandre Chartre <alexandre.chartre@oracle.com> Acked-by: Peter Zijlstra <peterz@infradead.org> Link: https://lkml.kernel.org/r/20200505134059.462640294@linutronix.de
Diffstat (limited to 'arch/x86/kernel/cpu/mce/core.c')
-rw-r--r--arch/x86/kernel/cpu/mce/core.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/arch/x86/kernel/cpu/mce/core.c b/arch/x86/kernel/cpu/mce/core.c
index 54165f3569e8..98bf91cd7d5d 100644
--- a/arch/x86/kernel/cpu/mce/core.c
+++ b/arch/x86/kernel/cpu/mce/core.c
@@ -1352,13 +1352,15 @@ void notrace do_machine_check(struct pt_regs *regs, long error_code)
/* Fault was in user mode and we need to take some action */
if ((m.cs & 3) == 3) {
- ist_begin_non_atomic(regs);
+ /* If this triggers there is no way to recover. Die hard. */
+ BUG_ON(!on_thread_stack() || !user_mode(regs));
local_irq_enable();
+ preempt_enable();
if (kill_it || do_memory_failure(&m))
force_sig(SIGBUS);
+ preempt_disable();
local_irq_disable();
- ist_end_non_atomic();
} else {
if (!fixup_exception(regs, X86_TRAP_MC, error_code, 0))
mce_panic("Failed kernel mode recovery", &m, msg);