[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen-unstable] xenstored: Guarantee to fire @releaseDomain watch when a domain is destructed.
# HG changeset patch # User kfraser@xxxxxxxxxxxxxxxxxxxxx # Date 1185285005 -3600 # Node ID eff24408830c5356b130318565c4e7f8abf16070 # Parent 531b8ccda9732e521ea96b4d0a6b6d58b8981149 xenstored: Guarantee to fire @releaseDomain watch when a domain is destructed. Previously this would be missed on some bail paths within xenstored which would talloc_free() the connection. Signed-off-by: Keir Fraser <keir@xxxxxxxxxxxxx> --- tools/xenstore/xenstored_domain.c | 9 ++++----- 1 files changed, 4 insertions(+), 5 deletions(-) diff -r 531b8ccda973 -r eff24408830c tools/xenstore/xenstored_domain.c --- a/tools/xenstore/xenstored_domain.c Tue Jul 24 11:10:08 2007 +0100 +++ b/tools/xenstore/xenstored_domain.c Tue Jul 24 14:50:05 2007 +0100 @@ -174,6 +174,8 @@ static int destroy_domain(void *_domain) if (domain->interface) munmap(domain->interface, getpagesize()); + + fire_watches(NULL, "@releaseDomain", false); return 0; } @@ -197,7 +199,7 @@ static void domain_cleanup(void) continue; } talloc_free(domain->conn); - notify = 1; + notify = 0; /* destroy_domain() fires the watch */ } if (notify) @@ -246,7 +248,6 @@ static struct domain *new_domain(void *c { struct domain *domain; int rc; - domain = talloc(context, struct domain); domain->port = 0; @@ -361,7 +362,7 @@ void do_introduce(struct connection *con /* Now domain belongs to its connection. */ talloc_steal(domain->conn, domain); - fire_watches(conn, "@introduceDomain", false); + fire_watches(NULL, "@introduceDomain", false); } else if ((domain->mfn == mfn) && (domain->conn != conn)) { /* Use XS_INTRODUCE for recreating the xenbus event-channel. */ if (domain->port) @@ -413,8 +414,6 @@ void do_release(struct connection *conn, } talloc_free(domain->conn); - - fire_watches(conn, "@releaseDomain", false); send_ack(conn, XS_RELEASE); } _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |