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@xensource.com>
This commit is contained in:
emellor@leeni.uk.xensource.com committed 2006-03-21 12:25:23 +01:00
1 parent d24b3a43ce
commit fb57267cd6
1 file changed
+2 -1
@@ -213,7 +213,8 @@ static void frontend_changed(struct xenbus_device *dev,
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;
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.