diff options
author | Steven Smith <ssmith@xensource.com> | 2006-10-31 11:31:34 +0000 |
---|---|---|
committer | Steven Smith <ssmith@xensource.com> | 2006-10-31 11:31:34 +0000 |
commit | 937f23487a2784df020112d67eff7eb58987bcc3 (patch) | |
tree | 22b737848a7dad71cdbf6fb49363d6d2fb3e1f58 /linux-2.6-xen-sparse | |
parent | 87410b08dc103e8a8f9ed28f47c90d14da2140b8 (diff) | |
download | xen-937f23487a2784df020112d67eff7eb58987bcc3.tar.gz xen-937f23487a2784df020112d67eff7eb58987bcc3.tar.bz2 xen-937f23487a2784df020112d67eff7eb58987bcc3.zip |
[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@cam.ac.uk>
Diffstat (limited to 'linux-2.6-xen-sparse')
-rw-r--r-- | linux-2.6-xen-sparse/drivers/xen/netfront/netfront.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/linux-2.6-xen-sparse/drivers/xen/netfront/netfront.c b/linux-2.6-xen-sparse/drivers/xen/netfront/netfront.c index e03e44a05a..1324345f94 100644 --- a/linux-2.6-xen-sparse/drivers/xen/netfront/netfront.c +++ b/linux-2.6-xen-sparse/drivers/xen/netfront/netfront.c @@ -522,7 +522,10 @@ static void backend_changed(struct xenbus_device *dev, 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; } } |