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

[Xen-changelog] [xen-unstable] x86: paging_log_dirty_op() should take care with invalid log_dirty.top



# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1238590175 -3600
# Node ID 2491158ccd173786590340cbcf77985f66cd2b8f
# Parent  01873414cfc13f6682210551b8fb3cb1b77bb2dd
x86: paging_log_dirty_op() should take care with invalid log_dirty.top

Signed-off-by: Keir Fraser <keir.fraser@xxxxxxxxxx>
---
 xen/arch/x86/mm/paging.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff -r 01873414cfc1 -r 2491158ccd17 xen/arch/x86/mm/paging.c
--- a/xen/arch/x86/mm/paging.c  Wed Apr 01 13:17:34 2009 +0100
+++ b/xen/arch/x86/mm/paging.c  Wed Apr 01 13:49:35 2009 +0100
@@ -385,13 +385,14 @@ int paging_log_dirty_op(struct domain *d
     }
 
     pages = 0;
-    l4 = map_domain_page(mfn_x(d->arch.paging.log_dirty.top));
+    l4 = (mfn_valid(d->arch.paging.log_dirty.top) ?
+          map_domain_page(mfn_x(d->arch.paging.log_dirty.top)) : NULL);
 
     for ( i4 = 0;
           (pages < sc->pages) && (i4 < LOGDIRTY_NODE_ENTRIES);
           i4++ )
     {
-        l3 = mfn_valid(l4[i4]) ? map_domain_page(mfn_x(l4[i4])) : NULL;
+        l3 = (l4 && mfn_valid(l4[i4])) ? map_domain_page(mfn_x(l4[i4])) : NULL;
         for ( i3 = 0;
               (pages < sc->pages) && (i3 < LOGDIRTY_NODE_ENTRIES);
               i3++ )

_______________________________________________
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®.