From: Max Zhen <Max.Zhen@Sun.COM>
To: xen-devel@lists.xensource.com
Cc: Max Zhen <Max.Zhen@Sun.COM>
Subject: [PATCH] fix race condition between xenconsoled and the removal of the entry of a dying domU from xenstore
Date: Fri, 01 Sep 2006 23:20:20 +0800 [thread overview]
Message-ID: <44F84FB4.5020305@Sun.COM> (raw)
# HG changeset patch
# User cz147101@xenbld.sfbay.sun.com
# Node ID db465ecb164e6d89290ae3d4fcc029e29305ae7d
# Parent c682ae7a17224dc5576ba3c5db47766b2a7dc159
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 do
mU entry from xenstore. If the removal of the domU entry from xenstore
comes lat
er than the first xs_gather() call in domain_create_ring(), it will go
on and bi
nd 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, li
ne 144
Signed-off-by: Max Zhen <max.zhen@sun.com>
diff -r c682ae7a1722 -r db465ecb164e tools/console/daemon/io.c
--- a/tools/console/daemon/io.c Fri Sep 01 12:16:21 2006 +0100
+++ b/tools/console/daemon/io.c Fri Sep 01 08:14:07 2006 -0700
@@ -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;
}
reply other threads:[~2006-09-01 15:20 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=44F84FB4.5020305@Sun.COM \
--to=max.zhen@sun.com \
--cc=xen-devel@lists.xensource.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.