diff options
author | Paul Durrant <pdurrant@amazon.com> | 2019-12-17 14:32:18 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2019-12-18 08:03:33 +0100 |
commit | 1f2565780e9b7218cf92c7630130e82dcc0fe9c2 (patch) | |
tree | a1fd76dfe0ab276b3f3a84361cea900eda27515e /drivers/net/xen-netback | |
parent | xen-netback: switch state to InitWait at the end of netback_probe()... (diff) | |
download | linux-1f2565780e9b7218cf92c7630130e82dcc0fe9c2.tar.xz linux-1f2565780e9b7218cf92c7630130e82dcc0fe9c2.zip |
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: Paul Durrant <pdurrant@amazon.com>
Acked-by: Wei Liu <wei.liu@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/xen-netback')
-rw-r--r-- | drivers/net/xen-netback/xenbus.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/xen-netback/xenbus.c b/drivers/net/xen-netback/xenbus.c index 682e5e20971b..17b4950ec051 100644 --- a/drivers/net/xen-netback/xenbus.c +++ b/drivers/net/xen-netback/xenbus.c @@ -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; } |