aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/vxlan.c
diff options
context:
space:
mode:
authorMark Bloch <markb@mellanox.com>2017-06-07 14:36:58 +0300
committerDavid S. Miller <davem@davemloft.net>2017-06-07 15:26:03 -0400
commit57d88182ea3e8763111882671fd7462289272f64 (patch)
tree8d2a087ee5737a1de6560ce3a094500742eae02b /drivers/net/vxlan.c
parentcxgb4: Fix tids count for ipv6 offload connection (diff)
downloadlinux-dev-57d88182ea3e8763111882671fd7462289272f64.tar.xz
linux-dev-57d88182ea3e8763111882671fd7462289272f64.zip
vxlan: use a more suitable function when assigning NULL
When stopping the vxlan interface we detach it from the socket. Use RCU_INIT_POINTER() and not rcu_assign_pointer() to do so. Suggested-by: Stephen Hemminger <stephen@networkplumber.org> Signed-off-by: Mark Bloch <markb@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/vxlan.c')
-rw-r--r--drivers/net/vxlan.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/vxlan.c b/drivers/net/vxlan.c
index a6b5052c1d36..7cb21a088bbc 100644
--- a/drivers/net/vxlan.c
+++ b/drivers/net/vxlan.c
@@ -1077,10 +1077,10 @@ static void vxlan_sock_release(struct vxlan_dev *vxlan)
#if IS_ENABLED(CONFIG_IPV6)
struct vxlan_sock *sock6 = rtnl_dereference(vxlan->vn6_sock);
- rcu_assign_pointer(vxlan->vn6_sock, NULL);
+ RCU_INIT_POINTER(vxlan->vn6_sock, NULL);
#endif
- rcu_assign_pointer(vxlan->vn4_sock, NULL);
+ RCU_INIT_POINTER(vxlan->vn4_sock, NULL);
synchronize_net();
vxlan_vs_del_dev(vxlan);