xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Olaf Hering <olaf@aepfle.de>
To: xen-devel@lists.xensource.com
Subject: [PATCH] linux-2.6.18: check availibility of XS_RESET_WATCHES command
Date: Thu, 05 Jan 2012 21:27:07 +0100	[thread overview]
Message-ID: <8d1991a7f8a37ec1fc9a.1325795227@probook.site> (raw)

# HG changeset patch
# User Olaf Hering <olaf@aepfle.de>
# Date 1325795190 -3600
# Node ID 8d1991a7f8a37ec1fc9a660cb48cb40ef42e9ff3
# Parent  821a5b2a10c86f18fbce0907af0db6905b9d540a
linux-2.6.18: check availibility of XS_RESET_WATCHES command

Check platform-feature-xs_reset_watches before sending XS_RESET_WATCHES
command. Buggy xenstored implementations such as EC2 do not ignore unknown
commands properly and cause a guest hang.

Signed-off-by: Olaf Hering <olaf@aepfle.de>

diff -r 821a5b2a10c8 -r 8d1991a7f8a3 drivers/xen/xenbus/xenbus_xs.c
--- a/drivers/xen/xenbus/xenbus_xs.c
+++ b/drivers/xen/xenbus/xenbus_xs.c
@@ -630,7 +630,12 @@ static struct xenbus_watch *find_watch(c
 static void xs_reset_watches(void)
 {
 #ifndef CONFIG_XEN
-	int err;
+	int err, supported = 0;
+
+	err = xenbus_scanf(XBT_NIL, "control",
+			"platform-feature-xs_reset_watches", "%d", &supported);
+	if (err != 1 || !supported)
+		return;
 
 	err = xs_error(xs_single(XBT_NIL, XS_RESET_WATCHES, "", NULL));
 	if (err && err != -EEXIST)

                 reply	other threads:[~2012-01-05 20:27 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=8d1991a7f8a37ec1fc9a.1325795227@probook.site \
    --to=olaf@aepfle.de \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).