[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20191217133218.27085-4-pdurrant@amazon.com>
Date: Tue, 17 Dec 2019 13:32:18 +0000
From: Paul Durrant <pdurrant@...zon.com>
To: <xen-devel@...ts.xenproject.org>, <netdev@...r.kernel.org>,
<linux-kernel@...r.kernel.org>
CC: Paul Durrant <pdurrant@...zon.com>, Wei Liu <wei.liu@...nel.org>,
"Paul Durrant" <paul@....org>,
"David S. Miller" <davem@...emloft.net>
Subject: [PATCH net-next 3/3] 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@...zon.com>
---
Cc: Wei Liu <wei.liu@...nel.org>
Cc: Paul Durrant <paul@....org>
Cc: "David S. Miller" <davem@...emloft.net>
---
drivers/net/xen-netback/xenbus.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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;
}
--
2.20.1
Powered by blists - more mailing lists