提交 57d88182 编写于 作者: M Mark Bloch 提交者: David S. Miller

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: NStephen Hemminger <stephen@networkplumber.org>
Signed-off-by: NMark Bloch <markb@mellanox.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 1dec4cec
...@@ -1077,10 +1077,10 @@ static void vxlan_sock_release(struct vxlan_dev *vxlan) ...@@ -1077,10 +1077,10 @@ static void vxlan_sock_release(struct vxlan_dev *vxlan)
#if IS_ENABLED(CONFIG_IPV6) #if IS_ENABLED(CONFIG_IPV6)
struct vxlan_sock *sock6 = rtnl_dereference(vxlan->vn6_sock); struct vxlan_sock *sock6 = rtnl_dereference(vxlan->vn6_sock);
rcu_assign_pointer(vxlan->vn6_sock, NULL); RCU_INIT_POINTER(vxlan->vn6_sock, NULL);
#endif #endif
rcu_assign_pointer(vxlan->vn4_sock, NULL); RCU_INIT_POINTER(vxlan->vn4_sock, NULL);
synchronize_net(); synchronize_net();
vxlan_vs_del_dev(vxlan); vxlan_vs_del_dev(vxlan);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册