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

[Xen-changelog] Only send the OFFLINE hotplug event if be->netif is set. Firstly, this ensures



# HG changeset patch
# User emellor@xxxxxxxxxxxxxxxxxxxxxx
# Node ID 02260f77c03545929cf5b958d4556437a978f4d5
# Parent  14c26df4f33c73148f96546772a2bdcfc7f17e00
Only send the OFFLINE hotplug event if be->netif is set.  Firstly, this ensures
that OFFLINE is only sent if the ONLINE event has been sent.  Secondly, this
fixes one possible cause of the reopened bug #549 as it prevents be->netif
being dereferenced inside netback_uevent.  Early reports suggest that this is
not the only cause of #549, so that bug remains open for now.

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

diff -r 14c26df4f33c -r 02260f77c035 
linux-2.6-xen-sparse/drivers/xen/netback/xenbus.c
--- a/linux-2.6-xen-sparse/drivers/xen/netback/xenbus.c Tue Mar 21 11:21:08 2006
+++ b/linux-2.6-xen-sparse/drivers/xen/netback/xenbus.c Tue Mar 21 11:25:23 2006
@@ -213,7 +213,8 @@
                break;
 
        case XenbusStateClosed:
-               kobject_uevent(&dev->dev.kobj, KOBJ_OFFLINE);
+               if (be->netif != NULL)
+                       kobject_uevent(&dev->dev.kobj, KOBJ_OFFLINE);
                device_unregister(&dev->dev);
                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®.