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] xenconsoled: Fixes to domain management.

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] xenconsoled: Fixes to domain management.
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Wed, 22 Apr 2009 07:00:23 -0700
Delivery-date: Wed, 22 Apr 2009 07:01:55 -0700
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.fraser@xxxxxxxxxx>
# Date 1240238309 -3600
# Node ID 69ba67bdbf936f05d176f11790b814252dadc9dd
# Parent  423a7f500059751e62c55f2fa5fc23f80c40b9e6
xenconsoled: Fixes to domain management.

Event-channel setup: Re-bind if the connection becomes unbound (e.g.,
due to 'slow' domain suspend cancellation), even if the remote port
identifier has not changed.

Domain logging: Only open log file once (don't leak fds) and fix a
small memory leak.

Evtchn changes based on a patch by Jiri Denemark <jdenemar@xxxxxxxxxx>

Signed-off-by: Keir Fraser <keir.fraser@xxxxxxxxxx>
---
 tools/console/daemon/io.c |   16 ++++++++++++----
 1 files changed, 12 insertions(+), 4 deletions(-)

diff -r 423a7f500059 -r 69ba67bdbf93 tools/console/daemon/io.c
--- a/tools/console/daemon/io.c Mon Apr 20 14:56:31 2009 +0100
+++ b/tools/console/daemon/io.c Mon Apr 20 15:38:29 2009 +0100
@@ -288,6 +288,7 @@ static int create_domain_log(struct doma
        namepath = s;
        strcat(namepath, "/name");
        data = xs_read(xs, XBT_NULL, namepath, &len);
+       free(namepath);
        if (!data)
                return -1;
        if (!len) {
@@ -548,9 +549,6 @@ static int domain_create_ring(struct dom
        }
        free(type);
 
-       if ((ring_ref == dom->ring_ref) && (remote_port == dom->remote_port))
-               goto out;
-
        if (ring_ref != dom->ring_ref) {
                if (dom->interface != NULL)
                        munmap(dom->interface, getpagesize());
@@ -565,6 +563,16 @@ static int domain_create_ring(struct dom
                dom->ring_ref = ring_ref;
        }
 
+       /* Go no further if port has not changed and we are still bound. */
+       if (remote_port == dom->remote_port) {
+               xc_evtchn_status_t status = {
+                       .dom = DOMID_SELF,
+                       .port = dom->local_port };
+               if ((xc_evtchn_status(xc, &status) == 0) &&
+                   (status.status == EVTCHNSTAT_interdomain))
+                       goto out;
+       }
+
        dom->local_port = -1;
        dom->remote_port = -1;
        if (dom->xce_handle != -1)
@@ -601,7 +609,7 @@ static int domain_create_ring(struct dom
                }
        }
 
-       if (log_guest)
+       if (log_guest && (dom->log_fd == -1))
                dom->log_fd = create_domain_log(dom);
 
  out:

_______________________________________________
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] xenconsoled: Fixes to domain management., Xen patchbot-unstable <=