Message ID | 1445981426-19727-60-git-send-email-kamal@canonical.com |
---|---|
State | New |
Headers | show |
diff --git a/arch/x86/kernel/entry_64.S b/arch/x86/kernel/entry_64.S index f8f94d4..9072010 100644 --- a/arch/x86/kernel/entry_64.S +++ b/arch/x86/kernel/entry_64.S @@ -1504,9 +1504,12 @@ ENTRY(nmi) * we don't want to enable interrupts, because then we'll end * up in an awkward situation in which IRQs are on but NMIs * are off. + * + * We also must not push anything to the stack before switching + * stacks lest we corrupt the "NMI executing" variable. */ - SWAPGS + SWAPGS_UNSAFE_STACK cld movq %rsp, %rdx movq PER_CPU_VAR(kernel_stack), %rsp