ipv6: lockless IPV6_MULTICAST_HOPS implementation
authorEric Dumazet <edumazet@google.com>
Tue, 12 Sep 2023 16:02:01 +0000 (16:02 +0000)
committerDavid S. Miller <davem@davemloft.net>
Fri, 15 Sep 2023 09:33:46 +0000 (10:33 +0100)
commit2da23eb07c91241d962f3ff05565065484cd8929
tree921417255db7f2389304c5f21aac9c828b58caa8
parentd986f52124e062753e33b6fe303be5904a997eac
ipv6: lockless IPV6_MULTICAST_HOPS implementation

This fixes data-races around np->mcast_hops,
and make IPV6_MULTICAST_HOPS lockless.

Note that np->mcast_hops is never negative,
thus can fit an u8 field instead of s16.

Signed-off-by: Eric Dumazet <edumazet@google.com>
Reviewed-by: David Ahern <dsahern@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/linux/ipv6.h
include/net/ipv6.h
net/dccp/ipv6.c
net/ipv6/ipv6_sockglue.c
net/ipv6/tcp_ipv6.c
net/netfilter/ipvs/ip_vs_sync.c