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

[Xen-changelog] [xen-4.0-testing] xen: fix XEN_DOMCTL_memory_mapping to not return with domain RCU lock held



# HG changeset patch
# User Keir Fraser <keir@xxxxxxx>
# Date 1295353554 0
# Node ID f47b924f74af83edc9a3020d38b7d5beb95c9dcc
# Parent  e480f36c958a9841aeaa0d36dae77774c583756e
xen: fix XEN_DOMCTL_memory_mapping to not return with domain RCU lock held

Broken in 20358:ecc649ec3675

Signed-off-by: Ian Campbell <ian.campbell@xxxxxxxxxx>
xen-unstable changeset:   22775:e4688c57c230
xen-unstable date:        Tue Jan 18 09:04:04 2011 +0000
---
 xen/arch/x86/domctl.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff -r e480f36c958a -r f47b924f74af xen/arch/x86/domctl.c
--- a/xen/arch/x86/domctl.c     Tue Jan 18 12:25:16 2011 +0000
+++ b/xen/arch/x86/domctl.c     Tue Jan 18 12:25:54 2011 +0000
@@ -962,13 +962,13 @@ long arch_do_domctl(
         if ( (mfn + nr_mfns - 1) < mfn ) /* wrap? */
             break;
 
-        ret = -ESRCH;
-        if ( unlikely((d = rcu_lock_domain_by_id(domctl->domain)) == NULL) )
-            break;
-
         ret = -EPERM;
         if ( !IS_PRIV(current->domain) &&
              !iomem_access_permitted(current->domain, mfn, mfn + nr_mfns - 1) )
+            break;
+
+        ret = -ESRCH;
+        if ( unlikely((d = rcu_lock_domain_by_id(domctl->domain)) == NULL) )
             break;
 
         ret=0;

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