x86/MCE: Dump MCE to dmesg if no consumers
authorBorislav Petkov <bp@suse.de>
Tue, 1 Nov 2016 11:52:27 +0000 (12:52 +0100)
committerThomas Gleixner <tglx@linutronix.de>
Tue, 8 Nov 2016 16:10:13 +0000 (17:10 +0100)
commitcd9c57cad3fe89ea949b9266cddc947c0838f7af
tree95bb03b5ae66cc17eb6584f4e2356af2ef85ee62
parent8c203dbb78ca7a9aed4e2570c866b0f43c752e41
x86/MCE: Dump MCE to dmesg if no consumers

When there are no error record consumers registered with the kernel, the
only thing that appears in dmesg is something like:

  [  300.000326] mce: [Hardware Error]: Machine check events logged

and the error records are gone. Which is seriously counterproductive.

So let's dump them to dmesg instead, in such a case.

Requested-by: Eric Morton <Eric.Morton@amd.com>
Signed-off-by: Borislav Petkov <bp@suse.de>
Cc: Tony Luck <tony.luck@intel.com>
Link: http://lkml.kernel.org/r/20161101120911.13163-4-bp@alien8.de
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
arch/x86/kernel/cpu/mcheck/mce.c