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-unstable] xen: fix XEN_DOMCTL_memory_mapping to not

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] xen: fix XEN_DOMCTL_memory_mapping to not return with domain RCU lock held
From: Xen patchbot-unstable <patchbot@xxxxxxx>
Date: Wed, 19 Jan 2011 02:20:18 -0800
Delivery-date: Wed, 19 Jan 2011 02:21:13 -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 1295341444 0
# Node ID e4688c57c2303432c48db16a5f72247c1c0e914e
# Parent  96441daf4a5b71bb5df81b9475a08f307d1d53e5
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/arch/x86/domctl.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff -r 96441daf4a5b -r e4688c57c230 xen/arch/x86/domctl.c
--- a/xen/arch/x86/domctl.c     Tue Jan 18 09:01:57 2011 +0000
+++ b/xen/arch/x86/domctl.c     Tue Jan 18 09:04:04 2011 +0000
@@ -965,13 +965,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-unstable] xen: fix XEN_DOMCTL_memory_mapping to not return with domain RCU lock held, Xen patchbot-unstable <=