From 10676930635e002e5c9471ad8ecae1f56313f56f Mon Sep 17 00:00:00 2001 From: Steven Rostedt Date: Sun, 19 Feb 2012 16:43:37 -0500 Subject: [PATCH] --- yaml --- r: 288020 b: refs/heads/master c: 45d5a1683c04be28abdf5c04c27b1417e0374486 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/arch/x86/kernel/entry_64.S | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index 4339aee893f8..e19400e6587f 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 32c3233885eb10ac9cb9410f2f8cd64b8df2b2a1 +refs/heads/master: 45d5a1683c04be28abdf5c04c27b1417e0374486 diff --git a/trunk/arch/x86/kernel/entry_64.S b/trunk/arch/x86/kernel/entry_64.S index 3fe8239fd8fb..debd851de6ff 100644 --- a/trunk/arch/x86/kernel/entry_64.S +++ b/trunk/arch/x86/kernel/entry_64.S @@ -1531,6 +1531,13 @@ ENTRY(nmi) /* Use %rdx as out temp variable throughout */ pushq_cfi %rdx + /* + * If %cs was not the kernel segment, then the NMI triggered in user + * space, which means it is definitely not nested. + */ + cmp $__KERNEL_CS, 16(%rsp) + jne first_nmi + /* * Check the special variable on the stack to see if NMIs are * executing.