aboutsummaryrefslogtreecommitdiffstats
path: root/tools/xenstore
diff options
context:
space:
mode:
authorKeir Fraser <keir@xensource.com>2007-10-26 11:48:58 +0100
committerKeir Fraser <keir@xensource.com>2007-10-26 11:48:58 +0100
commit7c5ba0bb0081aa01853777533b0d2cf2d740b070 (patch)
tree10267076b67a41d67da699fbacde733e3fc76301 /tools/xenstore
parent70ad570b27997f008b0609b8867ecdec65244a13 (diff)
downloadxen-7c5ba0bb0081aa01853777533b0d2cf2d740b070.tar.gz
xen-7c5ba0bb0081aa01853777533b0d2cf2d740b070.tar.bz2
xen-7c5ba0bb0081aa01853777533b0d2cf2d740b070.zip
Fire watch for non-dom0 backend when frontend is removed from xenstore
in a transaction. Signed-off-by: Max Zhen <max.zhen@sun.com>
Diffstat (limited to 'tools/xenstore')
-rw-r--r--tools/xenstore/xenstored_watch.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/tools/xenstore/xenstored_watch.c b/tools/xenstore/xenstored_watch.c
index 5fa8bbbe22..72927fa9c7 100644
--- a/tools/xenstore/xenstored_watch.c
+++ b/tools/xenstore/xenstored_watch.c
@@ -59,7 +59,16 @@ static void add_event(struct connection *conn,
if (!check_event_node(name)) {
/* Can this conn load node, or see that it doesn't exist? */
struct node *node = get_node(conn, name, XS_PERM_READ);
- if (!node && errno != ENOENT)
+ /*
+ * XXX We allow EACCES here because otherwise a non-dom0
+ * backend driver cannot watch for disappearance of a frontend
+ * xenstore directory. When the directory disappears, we
+ * revert to permissions of the parent directory for that path,
+ * which will typically disallow access for the backend.
+ * But this breaks device-channel teardown!
+ * Really we should fix this better...
+ */
+ if (!node && errno != ENOENT && errno != EACCES)
return;
}