mirror of
https://github.com/xen-project/xen.git
synced 2026-10-29 10:40:03 +01:00
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:
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;
|
||||
|
||||
|
||||