Skip to content

Commit 1f25657

Browse files
Paul Durrantdavem330
authored andcommitted
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 <[email protected]> Acked-by: Wei Liu <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent f55c318 commit 1f25657

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/net/xen-netback/xenbus.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -648,6 +648,7 @@ static void hotplug_status_changed(struct xenbus_watch *watch,
648648

649649
/* Not interested in this watch anymore. */
650650
unregister_hotplug_status_watch(be);
651+
xenbus_rm(XBT_NIL, be->dev->nodename, "hotplug-status");
651652
}
652653
kfree(str);
653654
}
@@ -959,7 +960,6 @@ static int netback_remove(struct xenbus_device *dev)
959960
if (be->vif) {
960961
kobject_uevent(&dev->dev.kobj, KOBJ_OFFLINE);
961962
xen_unregister_watchers(be->vif);
962-
xenbus_rm(XBT_NIL, dev->nodename, "hotplug-status");
963963
xenvif_free(be->vif);
964964
be->vif = NULL;
965965
}

0 commit comments

Comments
 (0)