aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv6/udp.c
diff options
context:
space:
mode:
authorEric Dumazet <edumazet@google.com>2023-12-08 10:12:43 +0000
committerDavid S. Miller <davem@davemloft.net>2023-12-11 10:59:17 +0000
commitd2f011a0bf28c090ad75c9b1d306f2e1dda1c9bc (patch)
tree672849531d60dae088df5508f6183ea01231b6ae /net/ipv6/udp.c
parent9a64d4c93eee6b2efb7a02ec98d9480946424509 (diff)
downloadlinux-d2f011a0bf28c090ad75c9b1d306f2e1dda1c9bc.tar.gz
ipv6: annotate data-races around np->mcast_oif
np->mcast_oif is read locklessly in some contexts. Make all accesses to this field lockless, adding appropriate annotations. This also makes setsockopt( IPV6_MULTICAST_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/ipv6/udp.c')
-rw-r--r--net/ipv6/udp.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/ipv6/udp.c b/net/ipv6/udp.c
index 622b10a549f75..0b7c755faa77b 100644
--- a/net/ipv6/udp.c
+++ b/net/ipv6/udp.c
@@ -1541,7 +1541,7 @@ do_udp_sendmsg:
connected = false;
if (!fl6->flowi6_oif && ipv6_addr_is_multicast(&fl6->daddr)) {
- fl6->flowi6_oif = np->mcast_oif;
+ fl6->flowi6_oif = READ_ONCE(np->mcast_oif);
connected = false;
} else if (!fl6->flowi6_oif)
fl6->flowi6_oif = np->ucast_oif;