diff options
author | Eric Dumazet <edumazet@google.com> | 2023-09-12 09:17:27 +0000 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2023-11-20 11:58:56 +0100 |
commit | f1f1f5cc1955748b0a844373250bcd8046c762d9 (patch) | |
tree | e8c86815c4378af3de74e120f712395c66ac37fa /net/ipv6 | |
parent | 8b2069d5c1e33d84b058b387850348b72e385856 (diff) | |
download | linux-stable-f1f1f5cc1955748b0a844373250bcd8046c762d9.tar.gz linux-stable-f1f1f5cc1955748b0a844373250bcd8046c762d9.tar.bz2 linux-stable-f1f1f5cc1955748b0a844373250bcd8046c762d9.zip |
udp: lockless UDP_ENCAP_L2TPINUDP / UDP_GRO
[ Upstream commit ac9a7f4ce5dda1472e8f44096f33066c6ec1a3b4 ]
Move udp->encap_enabled to udp->udp_flags.
Add udp_test_and_set_bit() helper to allow lockless
udp_tunnel_encap_enable() implementation.
Signed-off-by: Eric Dumazet <edumazet@google.com>
Reviewed-by: Willem de Bruijn <willemb@google.com>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Stable-dep-of: 70a36f571362 ("udp: annotate data-races around udp->encap_type")
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'net/ipv6')
-rw-r--r-- | net/ipv6/udp.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/ipv6/udp.c b/net/ipv6/udp.c index 2c3281879b6d..90688877e900 100644 --- a/net/ipv6/udp.c +++ b/net/ipv6/udp.c @@ -1670,7 +1670,7 @@ void udpv6_destroy_sock(struct sock *sk) if (encap_destroy) encap_destroy(sk); } - if (up->encap_enabled) { + if (udp_test_bit(ENCAP_ENABLED, sk)) { static_branch_dec(&udpv6_encap_needed_key); udp_encap_disable(); } |