diff options
author | Eric Dumazet <edumazet@google.com> | 2023-12-08 13:12:43 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2023-12-11 13:59:17 +0300 |
commit | d2f011a0bf28c090ad75c9b1d306f2e1dda1c9bc (patch) | |
tree | 672849531d60dae088df5508f6183ea01231b6ae /net/dccp/ipv6.c | |
parent | 9a64d4c93eee6b2efb7a02ec98d9480946424509 (diff) | |
download | linux-d2f011a0bf28c090ad75c9b1d306f2e1dda1c9bc.tar.xz |
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/dccp/ipv6.c')
-rw-r--r-- | net/dccp/ipv6.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/dccp/ipv6.c b/net/dccp/ipv6.c index 4550b680665a..06d7324276ec 100644 --- a/net/dccp/ipv6.c +++ b/net/dccp/ipv6.c @@ -669,7 +669,7 @@ discard: ipv6_pktoptions: if (!((1 << sk->sk_state) & (DCCPF_CLOSED | DCCPF_LISTEN))) { if (np->rxopt.bits.rxinfo || np->rxopt.bits.rxoinfo) - np->mcast_oif = inet6_iif(opt_skb); + WRITE_ONCE(np->mcast_oif, inet6_iif(opt_skb)); if (np->rxopt.bits.rxhlim || np->rxopt.bits.rxohlim) WRITE_ONCE(np->mcast_hops, ipv6_hdr(opt_skb)->hop_limit); if (np->rxopt.bits.rxflow || np->rxopt.bits.rxtclass) |