[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAOrHB_D3XJJyCXR4xXT_pwSOfBZnOPquUboy5bTCNrE+d72d9A@mail.gmail.com>
Date: Fri, 28 Oct 2016 09:59:33 -0700
From: Pravin Shelar <pshelar@....org>
To: Stephen Hemminger <stephen@...workplumber.org>
Cc: Linux Kernel Network Developers <netdev@...r.kernel.org>
Subject: Re: [PATCH net 1/2] vxlan: avoid using stale vxlan socket.
On Thu, Oct 27, 2016 at 4:02 PM, Stephen Hemminger
<stephen@...workplumber.org> wrote:
> On Thu, 27 Oct 2016 11:51:55 -0700
> Pravin B Shelar <pshelar@....org> wrote:
>
>> - vxlan->vn4_sock = NULL;
>> + rcu_assign_pointer(vxlan->vn4_sock, NULL);
>> #if IS_ENABLED(CONFIG_IPV6)
>> - vxlan->vn6_sock = NULL;
>> + rcu_assign_pointer(vxlan->vn6_sock, NULL);
>> if (ipv6 || metadata)
>
> User RCU_INIT_POINTER when setting pointer to NULL.
> It avoids unnecessary barrier.
OK. I have posted v2 patch to use RCU_INIT_POINTER().
Powered by blists - more mailing lists