[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen-unstable] linux: Fix for missing response to XS_UNWATCH request.
# HG changeset patch # User kfraser@xxxxxxxxxxxxxxxxxxxxx # Date 1175008765 -3600 # Node ID a9a39cc52e7499b7cc1712b8a23234dd2e7cbdb2 # Parent f1014cbe906a80d01a9321604a3bb32db7f5aec5 linux: Fix for missing response to XS_UNWATCH request. From: Magnus Carlsson <magnus@xxxxxxxxxx> Signed-off-by: Keir Fraser <keir@xxxxxxxxxxxxx> --- linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_dev.c | 18 +++++++++--------- 1 files changed, 9 insertions(+), 9 deletions(-) diff -r f1014cbe906a -r a9a39cc52e74 linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_dev.c --- a/linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_dev.c Tue Mar 27 16:03:30 2007 +0100 +++ b/linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_dev.c Tue Mar 27 16:19:25 2007 +0100 @@ -236,7 +236,10 @@ static ssize_t xenbus_dev_write(struct f break; case XS_WATCH: - case XS_UNWATCH: + case XS_UNWATCH: { + static const char *XS_RESP = "OK"; + struct xsd_sockmsg hdr; + path = u->u.buffer + sizeof(u->u.msg); token = memchr(path, 0, u->u.msg.len); if (token == NULL) { @@ -246,9 +249,6 @@ static ssize_t xenbus_dev_write(struct f token++; if (msg_type == XS_WATCH) { - static const char * XS_WATCH_RESP = "OK"; - struct xsd_sockmsg hdr; - watch = kmalloc(sizeof(*watch), GFP_KERNEL); watch->watch.node = kmalloc(strlen(path)+1, GFP_KERNEL); @@ -266,11 +266,6 @@ static ssize_t xenbus_dev_write(struct f } list_add(&watch->list, &u->watches); - - hdr.type = XS_WATCH; - hdr.len = strlen(XS_WATCH_RESP) + 1; - queue_reply(u, (char *)&hdr, sizeof(hdr)); - queue_reply(u, (char *)XS_WATCH_RESP, hdr.len); } else { list_for_each_entry_safe(watch, tmp_watch, &u->watches, list) { @@ -285,7 +280,12 @@ static ssize_t xenbus_dev_write(struct f } } + hdr.type = msg_type; + hdr.len = strlen(XS_RESP) + 1; + queue_reply(u, (char *)&hdr, sizeof(hdr)); + queue_reply(u, (char *)XS_RESP, hdr.len); break; + } default: rc = -EINVAL; _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |