On Thu, Oct 27, 2016 at 4:02 PM, Stephen Hemminger
wrote:
> On Thu, 27 Oct 2016 11:51:55 -0700
> Pravin B Shelar wrote:
>
>> - vxlan->vn4_sock = NULL;
>> + rcu_assign_pointer(vxlan->vn4_sock, NULL);
>> #if IS_ENABLED(CONFIG_IPV6)
>> - vxlan->vn6_sock = NULL;
>> + rcu_assign_point
On Thu, 27 Oct 2016 11:51:55 -0700
Pravin B Shelar 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_IN
When vxlan device is closed vxlan socket is freed. This
operation can race with vxlan-xmit function which
dereferences vxlan socket. Following patch uses RCU
mechanism to avoid this situation.
Signed-off-by: Pravin B Shelar
---
drivers/net/vxlan.c | 80 +--