[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen-3.4-testing] x86 mce: Fix panic in mcheck_mca_logout



# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1254409944 -3600
# Node ID d88559e9813eb35446d76907570c3aa9499fb1ee
# Parent  ee6d57c2d7ca162f98c55e13e714230fee4bf10f
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@xxxxxxxxxxxxxx>
xen-unstable changeset:   20204:56595ee2720a
xen-unstable date:        Tue Sep 15 09:25:41 2009 +0100
---
 xen/arch/x86/cpu/mcheck/mce.c |   10 ++++++----
 1 files changed, 6 insertions(+), 4 deletions(-)

diff -r ee6d57c2d7ca -r d88559e9813e xen/arch/x86/cpu/mcheck/mce.c
--- a/xen/arch/x86/cpu/mcheck/mce.c     Thu Oct 01 16:11:54 2009 +0100
+++ b/xen/arch/x86/cpu/mcheck/mce.c     Thu Oct 01 16:12:24 2009 +0100
@@ -191,10 +191,12 @@ mctelem_cookie_t mcheck_mca_logout(enum 
 
                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)

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.