[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20171031174533.6877e1a5@shemminger-XPS-13-9360>
Date: Tue, 31 Oct 2017 17:45:33 +0100
From: Stephen Hemminger <stephen@...workplumber.org>
To: Eric Dumazet <eric.dumazet@...il.com>
Cc: Vitaly Kuznetsov <vkuznets@...hat.com>,
Stephen Hemminger <sthemmin@...rosoft.com>,
netdev@...r.kernel.org, Haiyang Zhang <haiyangz@...rosoft.com>,
linux-kernel@...r.kernel.org, devel@...uxdriverproject.org
Subject: Re: [PATCH net-next 3/4] hv_netvsc: reset net_device_ctx->nvdev
with rcu_assign_pointer()
On Tue, 31 Oct 2017 07:09:58 -0700
Eric Dumazet <eric.dumazet@...il.com> wrote:
> On Tue, 2017-10-31 at 14:42 +0100, Vitaly Kuznetsov wrote:
> > 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@...hat.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);
>
> I see no point for this patch.
>
> Setting a NULL pointer needs no barrier at all.
Agreed with Eric.
Powered by blists - more mailing lists