From: Keir Fraser Date: Fri, 26 Oct 2007 10:48:58 +0000 (+0100) Subject: Fire watch for non-dom0 backend when frontend is removed from xenstore X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~14828^2~29 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=7c5ba0bb0081aa01853777533b0d2cf2d740b070;p=xen.git Fire watch for non-dom0 backend when frontend is removed from xenstore in a transaction. Signed-off-by: Max Zhen --- 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; }