WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] [xen-unstable] [NET] front: Fix crashes when xenstore wa

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] [NET] front: Fix crashes when xenstore watches fire multiple times.
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Thu, 14 Dec 2006 19:20:15 +0000
Delivery-date: Thu, 14 Dec 2006 11:19:46 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User kfraser@xxxxxxxxxxxxxxxxxxxxx
# Node ID 79315be2c9b9d6c2ed06669ed733a21b22611b99
# Parent  c3ff06093028962ffb64af4ef62693d6dc3525a2
[NET] front: Fix crashes when xenstore watches fire multiple times.
Signed-off-by: Keir Fraser <keir@xxxxxxxxxxxxx>
---
 linux-2.6-xen-sparse/drivers/xen/netfront/netfront.c   |    4 ++++
 linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_probe.c |    2 ++
 2 files changed, 6 insertions(+)

diff -r c3ff06093028 -r 79315be2c9b9 
linux-2.6-xen-sparse/drivers/xen/netfront/netfront.c
--- a/linux-2.6-xen-sparse/drivers/xen/netfront/netfront.c      Thu Dec 14 
12:02:30 2006 +0000
+++ b/linux-2.6-xen-sparse/drivers/xen/netfront/netfront.c      Thu Dec 14 
12:21:28 2006 +0000
@@ -525,6 +525,8 @@ static void backend_changed(struct xenbu
                break;
 
        case XenbusStateInitWait:
+               if (dev->state != XenbusStateInitialising)
+                       break;
                if (network_connect(netdev) != 0)
                        break;
                xenbus_switch_state(dev, XenbusStateConnected);
@@ -532,6 +534,8 @@ static void backend_changed(struct xenbu
                break;
 
        case XenbusStateClosing:
+               if (dev->state == XenbusStateClosed)
+                       break;
                netfront_closing(dev);
                break;
        }
diff -r c3ff06093028 -r 79315be2c9b9 
linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_probe.c
--- a/linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_probe.c    Thu Dec 14 
12:02:30 2006 +0000
+++ b/linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_probe.c    Thu Dec 14 
12:21:28 2006 +0000
@@ -487,6 +487,8 @@ int xenbus_probe_node(struct xen_bus_typ
        if (!xendev)
                return -ENOMEM;
 
+       xendev->state = XenbusStateInitialising;
+
        /* Copy the strings into the extra space. */
 
        tmpstring = (char *)(xendev + 1);

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] [NET] front: Fix crashes when xenstore watches fire multiple times., Xen patchbot-unstable <=