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] [CONSOLED] Shouldn't call domain_create_r

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] [CONSOLED] Shouldn't call domain_create_ring() for a domU which is shutting down.
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Wed, 13 Sep 2006 15:10:14 +0000
Delivery-date: Wed, 13 Sep 2006 08:10:57 -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 kaf24@xxxxxxxxxxxxxxxxxxxx
# Node ID 98fcd017c5f357d25e1fe648784eb3d42d0c115d
# Parent  b7f763a8a7efe3271e142831dc86f0550bce07ba
[CONSOLED] Shouldn't call domain_create_ring() for a domU which is shutting 
down.
There is a race condition between domain_create_ring() and the removal
of the domU entry from xenstore. If the removal of the domU entry from xenstore
comes later than the first xs_gather() call in domain_create_ring(), it will go
on and bind the evtchn port to the dying domU, which will cause below error
message: (XEN) (file=event_channel.c, line=144) EVTCHNOP failure: domain 0, 
error -22, line 144

Signed-off-by: Max Zhen <max.zhen@xxxxxxx>
---
 tools/console/daemon/io.c |   10 ++++++----
 1 files changed, 6 insertions(+), 4 deletions(-)

diff -r b7f763a8a7ef -r 98fcd017c5f3 tools/console/daemon/io.c
--- a/tools/console/daemon/io.c Wed Sep 13 13:54:59 2006 +0100
+++ b/tools/console/daemon/io.c Wed Sep 13 14:01:23 2006 +0100
@@ -293,12 +293,14 @@ static bool watch_domain(struct domain *
        bool success;
 
        sprintf(domid_str, "dom%u", dom->domid);
-       if (watch)
+       if (watch) {
                success = xs_watch(xs, dom->conspath, domid_str);
-       else
+               if (success)
+                       domain_create_ring(dom);
+       } else {
                success = xs_unwatch(xs, dom->conspath, domid_str);
-       if (success)
-               domain_create_ring(dom);
+       }
+
        return success;
 }
 

_______________________________________________
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] [CONSOLED] Shouldn't call domain_create_ring() for a domU which is shutting down., Xen patchbot-unstable <=