diff options
author | Eric Dumazet <edumazet@google.com> | 2023-08-16 10:15:42 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2023-08-16 12:09:17 +0200 |
commit | b1c0356a58577ce0a583e3044bf801877fc0b5de (patch) | |
tree | a5ed4452baf8a48fce1274b747228b842b18f377 /net/ipv4/ip_sockglue.c | |
parent | inet: move inet->transparent to inet->inet_flags (diff) | |
download | linux-b1c0356a58577ce0a583e3044bf801877fc0b5de.tar.xz linux-b1c0356a58577ce0a583e3044bf801877fc0b5de.zip |
inet: move inet->is_icsk to inet->inet_flags
We move single bit fields to inet->inet_flags to avoid races.
Signed-off-by: Eric Dumazet <edumazet@google.com>
Acked-by: Soheil Hassas Yeganeh <soheil@google.com>
Reviewed-by: Simon Horman <horms@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/ip_sockglue.c')
-rw-r--r-- | net/ipv4/ip_sockglue.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/ipv4/ip_sockglue.c b/net/ipv4/ip_sockglue.c index 3f5323a230b3..dac471ed067b 100644 --- a/net/ipv4/ip_sockglue.c +++ b/net/ipv4/ip_sockglue.c @@ -1034,7 +1034,7 @@ int do_ip_setsockopt(struct sock *sk, int level, int optname, break; old = rcu_dereference_protected(inet->inet_opt, lockdep_sock_is_held(sk)); - if (inet->is_icsk) { + if (inet_test_bit(IS_ICSK, sk)) { struct inet_connection_sock *icsk = inet_csk(sk); #if IS_ENABLED(CONFIG_IPV6) if (sk->sk_family == PF_INET || @@ -1209,7 +1209,7 @@ int do_ip_setsockopt(struct sock *sk, int level, int optname, struct ip_mreqn mreq; err = -EPROTO; - if (inet_sk(sk)->is_icsk) + if (inet_test_bit(IS_ICSK, sk)) break; if (optlen < sizeof(struct ip_mreq)) |