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

[Xen-devel] [PATCH 7/11] Don't unbind port when event channel binding fa

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] [PATCH 7/11] Don't unbind port when event channel binding fails! This happens when xend tries to introduce the same domain twice, giving strange effects when xend restarts.
From: Rusty Russell <rusty@xxxxxxxxxxxxxxx>
Date: Thu, 04 Aug 2005 22:31:43 +1000
Delivery-date: Thu, 04 Aug 2005 12:31:46 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
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
# HG changeset patch
# User Rusty Russell <rusty@xxxxxxxxxxxxxxx>
# Node ID 3550a20343ba6762cfca9e43d38866b036363e32
# Parent  b0de1894df67ac7c7d905bf61cdf0210b42752cc
Don't unbind port when event channel binding fails!  This happens when xend 
tries to introduce the same domain twice, giving strange effects when xend 
restarts.

Signed-off-by: Rusty Russell <rusty@xxxxxxxxxxxxxxx>

diff -r b0de1894df67 -r 3550a20343ba tools/xenstore/xenstored_domain.c
--- a/tools/xenstore/xenstored_domain.c Thu Aug  4 11:39:03 2005
+++ b/tools/xenstore/xenstored_domain.c Thu Aug  4 11:41:51 2005
@@ -261,8 +261,8 @@
 {
        struct domain *domain;
        domain = talloc(context, struct domain);
+       domain->port = 0;
        domain->domid = domid;
-       domain->port = port;
        domain->path = talloc_strdup(domain, path);
        domain->page = xc_map_foreign_range(*xc_handle, domain->domid,
                                            getpagesize(),
@@ -279,9 +279,10 @@
        domain->output = domain->page + getpagesize()/2;
 
        /* Tell kernel we're interested in this event. */
-       if (ioctl(eventchn_fd, EVENTCHN_BIND, domain->port) != 0)
+       if (ioctl(eventchn_fd, EVENTCHN_BIND, port) != 0)
                return NULL;
 
+       domain->port = port;
        domain->conn = new_connection(writechn, readchn);
        domain->conn->domain = domain;
        return domain;


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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] [PATCH 7/11] Don't unbind port when event channel binding fails! This happens when xend tries to introduce the same domain twice, giving strange effects when xend restarts., Rusty Russell <=