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

[Xen-changelog] From Gerd Knorr <kraxel@xxxxxxx>:



# HG changeset patch
# User emellor@xxxxxxxxxxxxxxxxxxxxxx
# Node ID a7129a40f239518d50b95beb751b6a27196e36c0
# Parent  00377595e4f922f32150012cccb4bd90ac7678b7
>From Gerd Knorr <kraxel@xxxxxxx>:

Watch events may get lost, the xenstored response races against the new
watch being added to the watch list in register_xenbus_watch().  Fixed
by adding the watch to the list unconditionally, and remove it in the
error case.

That one fixes the network issues I'm seeing.  Due to the race the
"online" hotplug event for the vif backend was lost sometimes.

Signed-off-by: Ewan Mellor <ewan@xxxxxxxxxxxxx>

diff -r 00377595e4f9 -r a7129a40f239 
linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_xs.c
--- a/linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_xs.c       Mon Oct 31 
16:01:31 2005
+++ b/linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_xs.c       Mon Oct 31 
16:03:13 2005
@@ -682,14 +682,15 @@
 
        spin_lock(&watches_lock);
        BUG_ON(find_watch(token));
+       list_add(&watch->list, &watches);
        spin_unlock(&watches_lock);
 
        err = xs_watch(watch->node, token);
 
        /* Ignore errors due to multiple registration. */
-       if ((err == 0) || (err == -EEXIST)) {
+       if ((err != 0) && (err != -EEXIST)) {
                spin_lock(&watches_lock);
-               list_add(&watch->list, &watches);
+               list_del(&watch->list);
                spin_unlock(&watches_lock);
        }
 

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


 


Rackspace

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