MCE: Move MCE work initialization to before enabling machine checks

Move the initialization of the mce work variable to before machine checks
are enabled in the CPU.

Also add a memory barrier to make sure the compiler doesn't move this.

This closes a (very unlikely and small) race window where a machine check
could happen before the work variable was initialized.

Signed-off-by: Andi Kleen <ak@linux.intel.com>
1 file changed