ia64/xen-unstable

changeset 16076:0c2535407828

[XEN] Shadow: fix locking in error path.
Signed-off-by: TIm Deegan <Tim.Deegan@xensource.com>
author Tim Deegan <Tim.Deegan@xensource.com>
date Mon Oct 08 09:40:49 2007 +0100 (2007-10-08)
parents a1d0a272c890
children 58db20a15687
files xen/arch/x86/mm/shadow/common.c
line diff
     1.1 --- a/xen/arch/x86/mm/shadow/common.c	Fri Oct 05 14:39:40 2007 +0100
     1.2 +++ b/xen/arch/x86/mm/shadow/common.c	Mon Oct 08 09:40:49 2007 +0100
     1.3 @@ -2372,13 +2372,13 @@ int shadow_enable(struct domain *d, u32 
     1.4          unsigned int r;
     1.5          shadow_lock(d);                
     1.6          r = sh_set_allocation(d, 256, NULL); /* Use at least 1MB */
     1.7 -        shadow_unlock(d);
     1.8          if ( r != 0 )
     1.9          {
    1.10              sh_set_allocation(d, 0, NULL);
    1.11              rv = -ENOMEM;
    1.12 -            goto out_unlocked;
    1.13 +            goto out_locked;
    1.14          }        
    1.15 +        shadow_unlock(d);
    1.16      }
    1.17  
    1.18      /* Init the P2M table.  Must be done before we take the shadow lock