diff options
author | kaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk> | 2006-09-13 14:01:23 +0100 |
---|---|---|
committer | kaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk> | 2006-09-13 14:01:23 +0100 |
commit | 80f2588d2b1d9c2aba5fa1a7a0f89c02428f891c (patch) | |
tree | aad7c37932272eb77f53c03ecebf5fc915461186 /tools/console/daemon | |
parent | 9f019b36fd2def8378029007a2166712499de18c (diff) | |
download | xen-80f2588d2b1d9c2aba5fa1a7a0f89c02428f891c.tar.gz xen-80f2588d2b1d9c2aba5fa1a7a0f89c02428f891c.tar.bz2 xen-80f2588d2b1d9c2aba5fa1a7a0f89c02428f891c.zip |
[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@sun.com>
Diffstat (limited to 'tools/console/daemon')
-rw-r--r-- | tools/console/daemon/io.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/tools/console/daemon/io.c b/tools/console/daemon/io.c index 93f96b101d..8bb18cafab 100644 --- a/tools/console/daemon/io.c +++ b/tools/console/daemon/io.c @@ -293,12 +293,14 @@ static bool watch_domain(struct domain *dom, bool watch) 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; } |