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-devel

Re: [Xen-devel] [PATCH][TOOL] Fix infinite loop in xenconsoled

To: Kouya Shimura <kouya@xxxxxxxxxxxxxx>, <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: Re: [Xen-devel] [PATCH][TOOL] Fix infinite loop in xenconsoled
From: Keir Fraser <keir@xxxxxxxxxxxxx>
Date: Tue, 14 Aug 2007 09:41:14 +0100
Delivery-date: Tue, 14 Aug 2007 01:41:53 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <7kodha8ulr.fsf@xxxxxxxxxxxxxxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: AcfeTt9jHhAWdEpCEdyOtwAX8io7RQ==
Thread-topic: [Xen-devel] [PATCH][TOOL] Fix infinite loop in xenconsoled
User-agent: Microsoft-Entourage/11.3.3.061214
Wow, that's nasty. The better fix is just not to have getdomaininfo()
recognise DOMID_SELF. No good can come of it and noone relies on it, I'm
certain. This was introduced by c/s 8394 but there's never been a user in
the tree.

That's the fix I'll apply to -unstable.

Thanks for tracking this one down!

 -- Keir

On 14/8/07 08:04, "Kouya Shimura" <kouya@xxxxxxxxxxxxxx> wrote:

> xenconsoled hungs when domid=(DOMID_FIRST_RESERVED-1).
> (i.e. domid + 1 == DOMID_SELF)
> Attached patch fixes it.
> 
> Thanks,
> Kouya
> 
> Signed-off-by: Kouya Shimura <kouya@xxxxxxxxxxxxxx>
> 
> diff -r 7953164cebb6 tools/console/daemon/io.c
> --- a/tools/console/daemon/io.c Tue Aug 07 09:07:29 2007 +0100
> +++ b/tools/console/daemon/io.c Tue Aug 14 15:36:23 2007 +0900
> @@ -569,6 +569,8 @@ void enum_domains(void)
> create_domain(dominfo.domid);
> }
> domid = dominfo.domid + 1;
> +  if (domid >= DOMID_FIRST_RESERVED)
> +   break;
> }
>  }
>  
> diff -r 7953164cebb6 tools/libxc/xc_domain.c
> --- a/tools/libxc/xc_domain.c Tue Aug 07 09:07:29 2007 +0100
> +++ b/tools/libxc/xc_domain.c Tue Aug 14 15:36:23 2007 +0900
> @@ -205,6 +205,10 @@ int xc_domain_getinfo(int xc_handle,
>                 sizeof(xen_domain_handle_t));
>  
>          next_domid = (uint16_t)domctl.domain + 1;
> +        if (next_domid >= DOMID_FIRST_RESERVED) {
> +            nr_doms++;
> +            break;
> +        }
>          info++;
>      }
>  
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@xxxxxxxxxxxxxxxxxxx
> http://lists.xensource.com/xen-devel


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>