From: Paul Durrant <pdurrant@amazon.com>
To: <xen-devel@lists.xenproject.org>, <netdev@vger.kernel.org>,
<linux-kernel@vger.kernel.org>
Cc: Paul Durrant <pdurrant@amazon.com>, Wei Liu <wei.liu@kernel.org>,
"Paul Durrant" <paul@xen.org>,
"David S. Miller" <davem@davemloft.net>
Subject: [PATCH net-next 3/3] xen-netback: remove 'hotplug-status' once it has served its purpose
Date: Tue, 17 Dec 2019 13:32:18 +0000 [thread overview]
Message-ID: <20191217133218.27085-4-pdurrant@amazon.com> (raw)
In-Reply-To: <20191217133218.27085-1-pdurrant@amazon.com>
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>
---
Cc: Wei Liu <wei.liu@kernel.org>
Cc: Paul Durrant <paul@xen.org>
Cc: "David S. Miller" <davem@davemloft.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
next prev parent reply other threads:[~2019-12-17 13:32 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-12-17 13:32 [PATCH net-next 0/3] xen-netback: clean-up Paul Durrant
2019-12-17 13:32 ` [PATCH net-next 1/3] xen-netback: move netback_probe() and netback_remove() to the end Paul Durrant
2019-12-17 15:23 ` Wei Liu
2019-12-18 7:03 ` David Miller
2019-12-17 13:32 ` [PATCH net-next 2/3] xen-netback: switch state to InitWait at the end of netback_probe() Paul Durrant
2019-12-17 15:23 ` Wei Liu
2019-12-18 7:03 ` David Miller
2019-12-17 13:32 ` Paul Durrant [this message]
2019-12-17 15:23 ` [PATCH net-next 3/3] xen-netback: remove 'hotplug-status' once it has served its purpose Wei Liu
2019-12-18 7:04 ` David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20191217133218.27085-4-pdurrant@amazon.com \
--to=pdurrant@amazon.com \
--cc=davem@davemloft.net \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=paul@xen.org \
--cc=wei.liu@kernel.org \
--cc=xen-devel@lists.xenproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).