Skip to content

Commit 2da8c7a

Browse files
mark-blochBrian Maly
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. Orabug: 29927196 Suggested-by: Stephen Hemminger <[email protected]> Signed-off-by: Mark Bloch <[email protected]> Signed-off-by: David S. Miller <[email protected]> (cherry picked from commit 57d8818) Reviewed-by: Rama Nichanamatlu <[email protected]> Signed-off-by: Venkat Venkatsubra <[email protected]> Signed-off-by: Brian Maly <[email protected]>
1 parent 927a8ce commit 2da8c7a

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
@@ -1056,10 +1056,10 @@ static void vxlan_sock_release(struct vxlan_dev *vxlan)
10561056
#if IS_ENABLED(CONFIG_IPV6)
10571057
struct vxlan_sock *sock6 = rtnl_dereference(vxlan->vn6_sock);
10581058

1059-
rcu_assign_pointer(vxlan->vn6_sock, NULL);
1059+
RCU_INIT_POINTER(vxlan->vn6_sock, NULL);
10601060
#endif
10611061

1062-
rcu_assign_pointer(vxlan->vn4_sock, NULL);
1062+
RCU_INIT_POINTER(vxlan->vn4_sock, NULL);
10631063
synchronize_net();
10641064

10651065
vxlan_vs_del_dev(vxlan);

0 commit comments

Comments
 (0)