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

[Xen-changelog] [xen-unstable] x86/mm/shadow: fix unlocking on error path in p2m allocator



# HG changeset patch
# User Tim Deegan <Tim.Deegan@xxxxxxxxxx>
# Date 1297252989 0
# Node ID 1967c7c290ebc6caf29cd3124facc47370c102a3
# Parent  f1fac30a531be95ce147a6acf7a94afb77c8a4a7
x86/mm/shadow: fix unlocking on error path in p2m allocator
One unlock path wasn't gated to match the lock.

Signed-off-by: Tim Deegan <Tim.Deegan@xxxxxxxxxx>
---
 xen/arch/x86/mm/shadow/common.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletion(-)

diff -r f1fac30a531b -r 1967c7c290eb xen/arch/x86/mm/shadow/common.c
--- a/xen/arch/x86/mm/shadow/common.c   Wed Feb 09 08:58:11 2011 +0000
+++ b/xen/arch/x86/mm/shadow/common.c   Wed Feb 09 12:03:09 2011 +0000
@@ -1634,7 +1634,8 @@ shadow_alloc_p2m_page(struct domain *d)
     if ( d->arch.paging.shadow.total_pages 
          < shadow_min_acceptable_pages(d) + 1 )
     {
-        shadow_unlock(d);
+        if ( do_locking )
+            shadow_unlock(d);
         return NULL;
     }
  

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