diff options
author | Eric Dumazet <edumazet@google.com> | 2023-09-12 19:02:11 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2023-09-15 12:33:48 +0300 |
commit | 6b724bc4300b431443f3b99520994a5aece347cd (patch) | |
tree | 02730c15dc86341705749df48ed87b7ca84688c1 /net/netfilter/ipvs | |
parent | 83cd5eb654b320c1972254f243531f3f3cebcccf (diff) | |
download | linux-6b724bc4300b431443f3b99520994a5aece347cd.tar.xz |
ipv6: lockless IPV6_MTU_DISCOVER implementation
Most np->pmtudisc reads are racy.
Move this 3bit field on a full byte, add annotations
and make IPV6_MTU_DISCOVER setsockopt() 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/netfilter/ipvs')
-rw-r--r-- | net/netfilter/ipvs/ip_vs_sync.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/netfilter/ipvs/ip_vs_sync.c b/net/netfilter/ipvs/ip_vs_sync.c index df1b33b61059..5820a8156c47 100644 --- a/net/netfilter/ipvs/ip_vs_sync.c +++ b/net/netfilter/ipvs/ip_vs_sync.c @@ -1341,7 +1341,7 @@ static void set_mcast_pmtudisc(struct sock *sk, int val) struct ipv6_pinfo *np = inet6_sk(sk); /* IPV6_MTU_DISCOVER */ - np->pmtudisc = val; + WRITE_ONCE(np->pmtudisc, val); } #endif release_sock(sk); |