WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] [xen-4.0-testing] xen: fix XEN_DOMCTL_memory_mapping to

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-4.0-testing] xen: fix XEN_DOMCTL_memory_mapping to not return with domain RCU lock held
From: "Xen patchbot-4.0-testing" <patchbot@xxxxxxx>
Date: Tue, 18 Jan 2011 23:00:24 -0800
Delivery-date: Tue, 18 Jan 2011 23:01:05 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# 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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-4.0-testing] xen: fix XEN_DOMCTL_memory_mapping to not return with domain RCU lock held, Xen patchbot-4.0-testing <=