ia64/xen-unstable

changeset 17908:e5ae980fe337

x86, shadow: Fix OOS bug on domain teardown.
Signed-off-by: Gianluca Guida <gianluca.guida@eu.citrix.com>
author Keir Fraser <keir.fraser@citrix.com>
date Fri Jun 27 13:45:55 2008 +0100 (2008-06-27)
parents dedfadeadf86
children baf3cc0faffc
files xen/arch/x86/mm/shadow/common.c
line diff
     1.1 --- a/xen/arch/x86/mm/shadow/common.c	Fri Jun 20 18:42:45 2008 +0100
     1.2 +++ b/xen/arch/x86/mm/shadow/common.c	Fri Jun 27 13:45:55 2008 +0100
     1.3 @@ -631,6 +631,11 @@ void oos_fixup_remove(struct vcpu *v, mf
     1.4  
     1.5      perfc_incr(shadow_oos_fixup_remove);
     1.6  
     1.7 +    /* If the domain is dying we might get called when deallocating
     1.8 +     * the shadows. Fixup tables are already freed so exit now. */
     1.9 +    if ( d->is_dying )
    1.10 +        return;
    1.11 +
    1.12      idx = mfn_x(gmfn) % SHADOW_OOS_FT_HASH;
    1.13      for_each_vcpu(d, v)
    1.14      {
    1.15 @@ -3168,6 +3173,7 @@ void shadow_teardown(struct domain *d)
    1.16          {
    1.17              free_xenheap_pages(v->arch.paging.shadow.oos_fixups,
    1.18                                 SHADOW_OOS_FT_ORDER);
    1.19 +            v->arch.paging.shadow.oos_fixups = NULL;
    1.20          }
    1.21  
    1.22          {