Skip to content

Commit

Permalink
xen-netback: remove 'hotplug-status' once it has served its purpose
Browse files Browse the repository at this point in the history
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: Paul Durrant <pdurrant@amazon.com>
Acked-by: Wei Liu <wei.liu@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Paul Durrant authored and davem330 committed Dec 18, 2019
1 parent f55c318 commit 1f25657
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/xen-netback/xenbus.c
Expand Up @@ -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);
}
Expand Down Expand Up @@ -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;
}
Expand Down

0 comments on commit 1f25657

Please sign in to comment.