From: Vitaly Kuznetsov <vkuznets@redhat.com>
To: netdev@vger.kernel.org
Cc: devel@linuxdriverproject.org,
Haiyang Zhang <haiyangz@microsoft.com>,
Stephen Hemminger <sthemmin@microsoft.com>,
linux-kernel@vger.kernel.org
Subject: [PATCH net-next 3/4] hv_netvsc: reset net_device_ctx->nvdev with rcu_assign_pointer()
Date: Tue, 31 Oct 2017 14:42:03 +0100 [thread overview]
Message-ID: <20171031134204.15287-4-vkuznets@redhat.com> (raw)
In-Reply-To: <20171031134204.15287-1-vkuznets@redhat.com>
RCU_INIT_POINTER() is not suitable here as it doesn't give us ordering
guarantees (see the comment in rcupdate.h). This is also not a hotpath.
Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com>
---
drivers/net/hyperv/netvsc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/hyperv/netvsc.c b/drivers/net/hyperv/netvsc.c
index bfc79698b8f4..12efb3e34775 100644
--- a/drivers/net/hyperv/netvsc.c
+++ b/drivers/net/hyperv/netvsc.c
@@ -560,7 +560,7 @@ void netvsc_device_remove(struct hv_device *device)
netvsc_revoke_buf(device, net_device);
- RCU_INIT_POINTER(net_device_ctx->nvdev, NULL);
+ rcu_assign_pointer(net_device_ctx->nvdev, NULL);
/*
* At this point, no one should be accessing net_device
--
2.13.6
next prev parent reply other threads:[~2017-10-31 13:42 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-31 13:42 [PATCH net-next 0/4] hv_netvsc: fix some crashes and hangs on channel/mtu changes Vitaly Kuznetsov
2017-10-31 13:42 ` [PATCH net-next 1/4] hv_netvsc: netvsc_teardown_gpadl() split Vitaly Kuznetsov
2017-10-31 16:37 ` Stephen Hemminger
2017-10-31 13:42 ` [PATCH net-next 2/4] hv_netvsc: protect nvdev->extension with RCU Vitaly Kuznetsov
2017-10-31 16:44 ` Stephen Hemminger
2017-10-31 17:13 ` Vitaly Kuznetsov
2017-11-02 10:27 ` Vitaly Kuznetsov
2017-10-31 13:42 ` Vitaly Kuznetsov [this message]
2017-10-31 14:09 ` [PATCH net-next 3/4] hv_netvsc: reset net_device_ctx->nvdev with rcu_assign_pointer() Eric Dumazet
2017-10-31 14:40 ` Vitaly Kuznetsov
2017-10-31 14:44 ` David Miller
2017-10-31 14:50 ` Vitaly Kuznetsov
2017-10-31 16:45 ` Stephen Hemminger
2017-10-31 13:42 ` [PATCH net-next 4/4] hv_netvsc: hide warnings about uninitialized/missing rndis device Vitaly Kuznetsov
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=20171031134204.15287-4-vkuznets@redhat.com \
--to=vkuznets@redhat.com \
--cc=devel@linuxdriverproject.org \
--cc=haiyangz@microsoft.com \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=sthemmin@microsoft.com \
/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).