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

[Xen-changelog] [xen-unstable] [XEN] Shadow: fix locking in error path.



# HG changeset patch
# User Tim Deegan <Tim.Deegan@xxxxxxxxxxxxx>
# Date 1191832849 -3600
# Node ID 0c2535407828d6473a2b5730155c66e76f9a0512
# Parent  a1d0a272c89053ffabf4705c7bfde83e5f503936
[XEN] Shadow: fix locking in error path.
Signed-off-by: TIm Deegan <Tim.Deegan@xxxxxxxxxxxxx>
---
 xen/arch/x86/mm/shadow/common.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff -r a1d0a272c890 -r 0c2535407828 xen/arch/x86/mm/shadow/common.c
--- a/xen/arch/x86/mm/shadow/common.c   Fri Oct 05 14:39:40 2007 +0100
+++ b/xen/arch/x86/mm/shadow/common.c   Mon Oct 08 09:40:49 2007 +0100
@@ -2372,13 +2372,13 @@ int shadow_enable(struct domain *d, u32 
         unsigned int r;
         shadow_lock(d);                
         r = sh_set_allocation(d, 256, NULL); /* Use at least 1MB */
-        shadow_unlock(d);
         if ( r != 0 )
         {
             sh_set_allocation(d, 0, NULL);
             rv = -ENOMEM;
-            goto out_unlocked;
+            goto out_locked;
         }        
+        shadow_unlock(d);
     }
 
     /* Init the P2M table.  Must be done before we take the shadow lock 

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