x86 mce: Fix panic in mcheck_mca_logout

I met the following panic message in mcheck_mca_logout().
MSR_IA32_MCi_ADDR might take the values other than the machine
address. FATAL PAGE FAULT occured when the non-existent address is
passed to maddr_get_owner().

Signed-off-by: Kazuhiro Suzuki <kaz@jp.fujitsu.com>
This commit is contained in:
Keir Fraser committed 2009-09-15 09:25:41 +01:00
1 parent 4e8febe0b8
commit 7451edbf39
1 file changed
+6 -4
+6 -4
View File
@@ -237,10 +237,12 @@ mctelem_cookie_t mcheck_mca_logout(enum mca_source who, cpu_banks_t bankmask,
if (status & MCi_STATUS_ADDRV) {
mca_rdmsrl(MSR_IA32_MC0_ADDR + 4 * i, addr);
d = maddr_get_owner(addr);
if (d != NULL && (who == MCA_POLLER ||
who == MCA_CMCI_HANDLER))
mcb.mc_domid = d->domain_id;
if (mfn_valid(paddr_to_pfn(addr))) {
d = maddr_get_owner(addr);
if (d != NULL && (who == MCA_POLLER ||
who == MCA_CMCI_HANDLER))
mcb.mc_domid = d->domain_id;
}
}
if (status & MCi_STATUS_MISCV)
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.