diff options
| author | Eric Dumazet <[email protected]> | 2023-08-16 08:15:33 +0000 |
|---|---|---|
| committer | David S. Miller <[email protected]> | 2023-08-16 10:09:16 +0000 |
| commit | c274af2242693f59f00851b3660a21b10bcd76cc (patch) | |
| tree | 9e6dff9911b9a0fd9b26f973ea89217f5ca29da0 /net/ipv6/udp.c | |
| parent | Merge branch 'redundant-of_match_ptr' (diff) | |
| download | kernel-c274af2242693f59f00851b3660a21b10bcd76cc.tar.gz kernel-c274af2242693f59f00851b3660a21b10bcd76cc.zip | |
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 <[email protected]>
Acked-by: Soheil Hassas Yeganeh <[email protected]>
Reviewed-by: Simon Horman <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
Diffstat (limited to 'net/ipv6/udp.c')
| -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 1ea01b0d9be3..ebc6ae47cfea 100644 --- a/net/ipv6/udp.c +++ b/net/ipv6/udp.c @@ -420,7 +420,7 @@ try_again: ip6_datagram_recv_common_ctl(sk, msg, skb); if (is_udp4) { - if (inet->cmsg_flags) + if (inet_cmsg_flags(inet)) ip_cmsg_recv_offset(msg, sk, skb, sizeof(struct udphdr), off); } else { |
