x86/mce: Fix check for processor context when machine check was taken.
commit1c4f53ca32463a742583976f40444ce4485f3cf9
authorTony Luck <tony.luck@intel.com>
Wed, 23 May 2012 21:14:22 +0000 (23 14:14 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 1 Jun 2012 07:13:00 +0000 (1 15:13 +0800)
tree68dcbed29e197bf61c0265d1091778bddd32f7ec
parentc179c9851c1b009faf3ec15b2af5042431a5a2ca
x86/mce: Fix check for processor context when machine check was taken.

commit 875e26648cf9b6db9d8dc07b7959d7c61fb3f49c upstream.

Linus pointed out that there was no value is checking whether m->ip
was zero - because zero is a legimate value.  If we have a reliable
(or faked in the VM86 case) "m->cs" we can use it to tell whether we
were in user mode or kernelwhen the machine check hit.

Reported-by: Linus Torvalds <torvalds@linuxfoundation.org>
Signed-off-by: Tony Luck <tony.luck@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/x86/kernel/cpu/mcheck/mce-severity.c