summaryrefslogtreecommitdiff
path: root/net/ipv6/datagram.c
diff options
context:
space:
mode:
authorEric Dumazet <edumazet@google.com>2023-12-08 10:12:44 +0000
committerDavid S. Miller <davem@davemloft.net>2023-12-11 10:59:17 +0000
commit1ac13efd614c752d3b47bbfb58e7c36eeb92cb5a (patch)
tree34623c8c03fc41bcf60cea58e0db4a8bb4ea7f35 /net/ipv6/datagram.c
parentd2f011a0bf28c090ad75c9b1d306f2e1dda1c9bc (diff)
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/ipv6/datagram.c')
-rw-r--r--net/ipv6/datagram.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/ipv6/datagram.c b/net/ipv6/datagram.c
index 1804bd6f4684..fff78496803d 100644
--- a/net/ipv6/datagram.c
+++ b/net/ipv6/datagram.c
@@ -62,7 +62,7 @@ static void ip6_datagram_flow_key_init(struct flowi6 *fl6,
if (ipv6_addr_is_multicast(&fl6->daddr))
oif = READ_ONCE(np->mcast_oif);
else
- oif = np->ucast_oif;
+ oif = READ_ONCE(np->ucast_oif);
}
fl6->flowi6_oif = oif;