# HG changeset patch # Parent ac68ad6fe4b779ca0b894ca3845b66662dd2dd9c CMCI: Fix pagefault The CMCI handler blindly dereferences the dom0 pointer. If a CMCI occurs during early boot, this results in a page fault and reboot. Check the dom0 pointer first. If it is null, then the CMCI information is dumped onto the Xen console, and booting continues happily. Signed-off-by: Andrew Cooper diff -r ac68ad6fe4b7 xen/arch/x86/cpu/mcheck/mce_intel.c --- a/xen/arch/x86/cpu/mcheck/mce_intel.c +++ b/xen/arch/x86/cpu/mcheck/mce_intel.c @@ -705,7 +705,7 @@ fastcall void smp_cmci_interrupt(struct MCA_CMCI_HANDLER, __get_cpu_var(mce_banks_owned), &bs); if (bs.errcnt && mctc != NULL) { - if (guest_enabled_event(dom0->vcpu[0], VIRQ_MCA)) { + if (dom0 && guest_enabled_event(dom0->vcpu[0], VIRQ_MCA)) { mctelem_commit(mctc); printk(KERN_DEBUG "CMCI: send CMCI to DOM0 through virq\n"); send_guest_global_virq(dom0, VIRQ_MCA);