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: Do not accept DOMID_SELF as input to

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] xen: Do not accept DOMID_SELF as input to DOMCTL_getdomaininfo.
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Thu, 16 Aug 2007 07:40:32 -0700
Delivery-date: Thu, 16 Aug 2007 07:43:02 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
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/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/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 kfraser@xxxxxxxxxxxxxxxxxxxxx
# Date 1187081806 -3600
# Node ID ef79bf6f0142142003681052f925ad8f85b26ab5
# Parent  fdffab15499d1f976d41ca0c475e5fae1c2f02ad
xen: Do not accept DOMID_SELF as input to DOMCTL_getdomaininfo.
This was screwing up callers that loop on getdomaininfo(), if there
was a domain with domid DOMID_FIRST_RESERVED-1 (== DOMID_SELF-1).
They would see DOMID_SELF-1, then look up DOMID_SELF, which has domid
0 of course, and then start their domain-finding loop all over again!
Found by Kouya Shimura <kouya@xxxxxxxxxxxxxx>. Thanks!
Signed-off-by: Keir Fraser <keir@xxxxxxxxxxxxx>
---
 xen/common/domctl.c |    8 +-------
 1 files changed, 1 insertion(+), 7 deletions(-)

diff -r fdffab15499d -r ef79bf6f0142 xen/common/domctl.c
--- a/xen/common/domctl.c       Tue Aug 14 09:21:39 2007 +0100
+++ b/xen/common/domctl.c       Tue Aug 14 09:56:46 2007 +0100
@@ -463,19 +463,13 @@ long do_domctl(XEN_GUEST_HANDLE(xen_domc
     case XEN_DOMCTL_getdomaininfo:
     { 
         struct domain *d;
-        domid_t dom;
-
-        dom = op->domain;
-        if ( dom == DOMID_SELF )
-            dom = current->domain->domain_id;
+        domid_t dom = op->domain;
 
         rcu_read_lock(&domlist_read_lock);
 
         for_each_domain ( d )
-        {
             if ( d->domain_id >= dom )
                 break;
-        }
 
         if ( d == NULL )
         {

_______________________________________________
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: Do not accept DOMID_SELF as input to DOMCTL_getdomaininfo., Xen patchbot-unstable <=