From: Magnus Carlsson <magnus@galois.com>
To: xen-devel@lists.xensource.com
Subject: [PATCH] Fix for missing response to XS_UNWATCH request.
Date: Wed, 21 Mar 2007 15:31:40 -0700 [thread overview]
Message-ID: <4601B24C.3060706@galois.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 112 bytes --]
With this patch, Dom0 clients can do "unwatch" properly through the
kernel's xenbus connection.
Cheers,
Magnus
[-- Attachment #2: xenbus_dev-response-fix.patch --]
[-- Type: text/x-patch, Size: 1590 bytes --]
# HG changeset patch
# User Magnus Carlsson <magnus@galois.com>
# Date 1174512701 25200
# Node ID 001a9729e8f7a6c0da128a7f9586f9a304e17cab
# Parent 3fd9b0c71b8c687b108a8bf671c9c4fc47046a0a
Fix for missing response to XS_UNWATCH request.
diff -r 3fd9b0c71b8c -r 001a9729e8f7 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 20 17:36:18 2007 +0000
+++ b/linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_dev.c Wed Mar 21 14:31:41 2007 -0700
@@ -246,9 +246,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 +263,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) {
@@ -284,6 +276,14 @@ static ssize_t xenbus_dev_write(struct f
}
}
}
+ {
+ static const char * XS_RESP = "OK";
+ struct xsd_sockmsg hdr;
+ 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;
[-- Attachment #3: Type: text/plain, Size: 138 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel
reply other threads:[~2007-03-21 22:31 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4601B24C.3060706@galois.com \
--to=magnus@galois.com \
--cc=xen-devel@lists.xensource.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.