diff options
author | Eric Dumazet <edumazet@google.com> | 2023-08-31 15:52:11 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2023-09-01 08:27:33 +0200 |
commit | e3390b30a5dfb112e8e802a59c0f68f947b638b2 (patch) | |
tree | 38835b9b79b0e5e3c1ea602ae098e48c90e25109 /net/ipv4/ip_sockglue.c | |
parent | mptcp: annotate data-races around msk->rmem_fwd_alloc (diff) | |
download | linux-e3390b30a5dfb112e8e802a59c0f68f947b638b2.tar.xz linux-e3390b30a5dfb112e8e802a59c0f68f947b638b2.zip |
net: annotate data-races around sk->sk_tsflags
sk->sk_tsflags can be read locklessly, add corresponding annotations.
Fixes: b9f40e21ef42 ("net-timestamp: move timestamp flags out of sk_flags")
Signed-off-by: Eric Dumazet <edumazet@google.com>
Cc: Willem de Bruijn <willemb@google.com>
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 | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/ipv4/ip_sockglue.c b/net/ipv4/ip_sockglue.c index d1c73660b844..cce9cb25f3b3 100644 --- a/net/ipv4/ip_sockglue.c +++ b/net/ipv4/ip_sockglue.c @@ -511,7 +511,7 @@ static bool ipv4_datagram_support_cmsg(const struct sock *sk, * or without payload (SOF_TIMESTAMPING_OPT_TSONLY). */ info = PKTINFO_SKB_CB(skb); - if (!(sk->sk_tsflags & SOF_TIMESTAMPING_OPT_CMSG) || + if (!(READ_ONCE(sk->sk_tsflags) & SOF_TIMESTAMPING_OPT_CMSG) || !info->ipi_ifindex) return false; |