• Borislav Petkov's avatar
    x86/mce: Fix MCE severity messages · 17fea54b
    Borislav Petkov authored
    Derek noticed that a critical MCE gets reported with the wrong
    error type description:
    
      [Hardware Error]: CPU 34: Machine Check Exception: 5 Bank 9: f200003f000100b0
      [Hardware Error]: RIP !INEXACT! 10:<ffffffff812e14c1> {intel_idle+0xb1/0x170}
      [Hardware Error]: TSC 49587b8e321cb
      [Hardware Error]: PROCESSOR 0:306e4 TIME 1431561296 SOCKET 1 APIC 29
      [Hardware Error]: Some CPUs didn't answer in synchronization
      [Hardware Error]: Machine check: Invalid
    				   ^^^^^^^
    
    The last line with 'Invalid' should have printed the high level
    MCE error type description we get from mce_severity, i.e.
    something like:
    
      [Hardware Error]: Machine check: Action required: data load error in a user process
    
    this happens due to the fact that mce_no_way_out() iterates over
    all MCA banks and possibly overwrites the @msg argument which is
    used in the panic printing later.
    
    Change behavior to take the message of only and the (last)
    critical MCE it detects.
    Reported-by: default avatarDerek <denc716@gmail.com>
    Signed-off-by: default avatarBorislav Petkov <bp@suse.de>
    Cc: <stable@vger.kernel.org>
    Cc: H. Peter Anvin <hpa@zytor.com>
    Cc: Linus Torvalds <torvalds@linux-foundation.org>
    Cc: Peter Zijlstra <peterz@infradead.org>
    Cc: Thomas Gleixner <tglx@linutronix.de>
    Cc: Tony Luck <tony.luck@intel.com>
    Link: http://lkml.kernel.org/r/1431936437-25286-3-git-send-email-bp@alien8.deSigned-off-by: default avatarIngo Molnar <mingo@kernel.org>
    17fea54b
mce.c 59.2 KB