ia64/xen-unstable

changeset 19492:2491158ccd17

x86: paging_log_dirty_op() should take care with invalid log_dirty.top

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
author Keir Fraser <keir.fraser@citrix.com>
date Wed Apr 01 13:49:35 2009 +0100 (2009-04-01)
parents 01873414cfc1
children 4da7f15e9126
files xen/arch/x86/mm/paging.c
line diff
     1.1 --- a/xen/arch/x86/mm/paging.c	Wed Apr 01 13:17:34 2009 +0100
     1.2 +++ b/xen/arch/x86/mm/paging.c	Wed Apr 01 13:49:35 2009 +0100
     1.3 @@ -385,13 +385,14 @@ int paging_log_dirty_op(struct domain *d
     1.4      }
     1.5  
     1.6      pages = 0;
     1.7 -    l4 = map_domain_page(mfn_x(d->arch.paging.log_dirty.top));
     1.8 +    l4 = (mfn_valid(d->arch.paging.log_dirty.top) ?
     1.9 +          map_domain_page(mfn_x(d->arch.paging.log_dirty.top)) : NULL);
    1.10  
    1.11      for ( i4 = 0;
    1.12            (pages < sc->pages) && (i4 < LOGDIRTY_NODE_ENTRIES);
    1.13            i4++ )
    1.14      {
    1.15 -        l3 = mfn_valid(l4[i4]) ? map_domain_page(mfn_x(l4[i4])) : NULL;
    1.16 +        l3 = (l4 && mfn_valid(l4[i4])) ? map_domain_page(mfn_x(l4[i4])) : NULL;
    1.17          for ( i3 = 0;
    1.18                (pages < sc->pages) && (i3 < LOGDIRTY_NODE_ENTRIES);
    1.19                i3++ )