Skip to content

Commit 57d8818

Browse files
mark-blochdavem330
authored andcommitted
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 <[email protected]> Signed-off-by: Mark Bloch <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 1dec4ce commit 57d8818

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/net/vxlan.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1077,10 +1077,10 @@ static void vxlan_sock_release(struct vxlan_dev *vxlan)
10771077
#if IS_ENABLED(CONFIG_IPV6)
10781078
struct vxlan_sock *sock6 = rtnl_dereference(vxlan->vn6_sock);
10791079

1080-
rcu_assign_pointer(vxlan->vn6_sock, NULL);
1080+
RCU_INIT_POINTER(vxlan->vn6_sock, NULL);
10811081
#endif
10821082

1083-
rcu_assign_pointer(vxlan->vn4_sock, NULL);
1083+
RCU_INIT_POINTER(vxlan->vn4_sock, NULL);
10841084
synchronize_net();
10851085

10861086
vxlan_vs_del_dev(vxlan);

0 commit comments

Comments
 (0)