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

[Xen-changelog] [xen-unstable] [NETFRONT] Make sure we don't crash if the backend goes to state



# HG changeset patch
# User Steven Smith <ssmith@xxxxxxxxxxxxx>
# Node ID b2371c9e05f5146767464db8504214ae2b77c25c
# Parent  b21246720fde43b11835d814e9755f1f3888f9e4
[NETFRONT] Make sure we don't crash if the backend goes to state
Closing before we have a chance to connect.  This can happen if
there's an error while connecting.

Signed-off-by: Steven Smith <sos22@xxxxxxxxx>
---
 linux-2.6-xen-sparse/drivers/xen/netfront/netfront.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletion(-)

diff -r b21246720fde -r b2371c9e05f5 
linux-2.6-xen-sparse/drivers/xen/netfront/netfront.c
--- a/linux-2.6-xen-sparse/drivers/xen/netfront/netfront.c      Mon Oct 30 
17:35:11 2006 +0000
+++ b/linux-2.6-xen-sparse/drivers/xen/netfront/netfront.c      Tue Oct 31 
11:31:34 2006 +0000
@@ -522,7 +522,10 @@ static void backend_changed(struct xenbu
                break;
 
        case XenbusStateClosing:
-               netfront_closing(dev);
+               if (dev->state == XenbusStateConnected)
+                       netfront_closing(dev);
+               else
+                       printk(KERN_DEBUG "Netfront: going to state Closing 
without being connected...\n");
                break;
        }
 }

_______________________________________________
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®.