Commit 1f256578 authored by Paul Durrant's avatar Paul Durrant Committed by David S. Miller

xen-netback: remove 'hotplug-status' once it has served its purpose

Removing the 'hotplug-status' node in netback_remove() is wrong; the script
may not have completed. Only remove the node once the watch has fired and
has been unregistered.
Signed-off-by: default avatarPaul Durrant <pdurrant@amazon.com>
Acked-by: default avatarWei Liu <wei.liu@kernel.org>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent f55c3188
......@@ -648,6 +648,7 @@ static void hotplug_status_changed(struct xenbus_watch *watch,
/* Not interested in this watch anymore. */
unregister_hotplug_status_watch(be);
xenbus_rm(XBT_NIL, be->dev->nodename, "hotplug-status");
}
kfree(str);
}
......@@ -959,7 +960,6 @@ static int netback_remove(struct xenbus_device *dev)
if (be->vif) {
kobject_uevent(&dev->dev.kobj, KOBJ_OFFLINE);
xen_unregister_watchers(be->vif);
xenbus_rm(XBT_NIL, dev->nodename, "hotplug-status");
xenvif_free(be->vif);
be->vif = NULL;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment