[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [PATCH] linux-2.6.18: check availibility of XS_RESET_WATCHES command


  • To: xen-devel@xxxxxxxxxxxxxxxxxxx
  • From: Olaf Hering <olaf@xxxxxxxxx>
  • Date: Thu, 05 Jan 2012 21:27:07 +0100
  • Delivery-date: Thu, 05 Jan 2012 20:28:04 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xensource.com>

# HG changeset patch
# User Olaf Hering <olaf@xxxxxxxxx>
# 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@xxxxxxxxx>

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)

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.