summaryrefslogtreecommitdiffstats
path: root/net/l2tp/l2tp_ip6.c
diff options
context:
space:
mode:
authorEric Dumazet <edumazet@google.com>2023-12-08 11:12:44 +0100
committerDavid S. Miller <davem@davemloft.net>2023-12-11 11:59:17 +0100
commit1ac13efd614c752d3b47bbfb58e7c36eeb92cb5a (patch)
tree34623c8c03fc41bcf60cea58e0db4a8bb4ea7f35 /net/l2tp/l2tp_ip6.c
parentipv6: annotate data-races around np->mcast_oif (diff)
downloadlinux-1ac13efd614c752d3b47bbfb58e7c36eeb92cb5a.tar.xz
linux-1ac13efd614c752d3b47bbfb58e7c36eeb92cb5a.zip
ipv6: annotate data-races around np->ucast_oif
np->ucast_oif is read locklessly in some contexts. Make all accesses to this field lockless, adding appropriate annotations. This also makes setsockopt( IPV6_UNICAST_IF ) lockless. Signed-off-by: Eric Dumazet <edumazet@google.com> Reviewed-by: David Ahern <dsahern@kernel.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/l2tp/l2tp_ip6.c')
-rw-r--r--net/l2tp/l2tp_ip6.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/l2tp/l2tp_ip6.c b/net/l2tp/l2tp_ip6.c
index 17301f9dd228..dd3153966173 100644
--- a/net/l2tp/l2tp_ip6.c
+++ b/net/l2tp/l2tp_ip6.c
@@ -601,7 +601,7 @@ static int l2tp_ip6_sendmsg(struct sock *sk, struct msghdr *msg, size_t len)
if (!fl6.flowi6_oif && ipv6_addr_is_multicast(&fl6.daddr))
fl6.flowi6_oif = READ_ONCE(np->mcast_oif);
else if (!fl6.flowi6_oif)
- fl6.flowi6_oif = np->ucast_oif;
+ fl6.flowi6_oif = READ_ONCE(np->ucast_oif);
security_sk_classify_flow(sk, flowi6_to_flowi_common(&fl6));