diff options
author | Eric Dumazet <edumazet@google.com> | 2023-09-22 06:42:14 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2023-10-01 21:39:18 +0300 |
commit | c9746e6a19c24b2d9a74d6657daee3b39fdc1bec (patch) | |
tree | 0c4c1653ac642f05004c576ce39640e3cc055011 /net/ipv4/ip_output.c | |
parent | 2be825ebb9d1b17f1a9e46af78d24b76c4ff7a1f (diff) | |
download | linux-c9746e6a19c24b2d9a74d6657daee3b39fdc1bec.tar.xz |
inet: implement lockless IP_MULTICAST_TTL
inet->mc_ttl can be read locklessly.
Implement proper lockless reads and writes to inet->mc_ttl
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/ipv4/ip_output.c')
-rw-r--r-- | net/ipv4/ip_output.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/ipv4/ip_output.c b/net/ipv4/ip_output.c index 6b14097e80ad..f07ce051760d 100644 --- a/net/ipv4/ip_output.c +++ b/net/ipv4/ip_output.c @@ -1430,7 +1430,7 @@ struct sk_buff *__ip_make_skb(struct sock *sk, if (cork->ttl != 0) ttl = cork->ttl; else if (rt->rt_type == RTN_MULTICAST) - ttl = inet->mc_ttl; + ttl = READ_ONCE(inet->mc_ttl); else ttl = ip_select_ttl(inet, &rt->dst); |