diff options
author | Eric Dumazet <edumazet@google.com> | 2023-08-16 11:15:33 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2023-08-16 13:09:16 +0300 |
commit | c274af2242693f59f00851b3660a21b10bcd76cc (patch) | |
tree | 9e6dff9911b9a0fd9b26f973ea89217f5ca29da0 /net/ipv4/udp.c | |
parent | 936db833c2dd0a9ae738c8ce24fff816c9c8e381 (diff) | |
download | linux-c274af2242693f59f00851b3660a21b10bcd76cc.tar.xz |
inet: introduce inet->inet_flags
Various inet fields are currently racy.
do_ip_setsockopt() and do_ip_getsockopt() are mostly holding
the socket lock, but some (fast) paths do not.
Use a new inet->inet_flags to hold atomic bits in the series.
Remove inet->cmsg_flags, and use instead 9 bits from inet_flags.
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/udp.c')
-rw-r--r-- | net/ipv4/udp.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/ipv4/udp.c b/net/ipv4/udp.c index 3e2f29c14fa8..4b791133989c 100644 --- a/net/ipv4/udp.c +++ b/net/ipv4/udp.c @@ -1870,7 +1870,7 @@ try_again: if (udp_sk(sk)->gro_enabled) udp_cmsg_recv(msg, sk, skb); - if (inet->cmsg_flags) + if (inet_cmsg_flags(inet)) ip_cmsg_recv_offset(msg, sk, skb, sizeof(struct udphdr), off); err = copied; |