summaryrefslogtreecommitdiff
path: root/include/net/ip.h
diff options
context:
space:
mode:
authorEric Dumazet <edumazet@google.com>2023-08-31 13:52:11 +0000
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2024-01-10 17:10:23 +0100
commitc48fcb4f49061b8bdda946474215ba8c4e8c27b6 (patch)
treedeacf0c510ed807832102727d67e7e7a12c7570e /include/net/ip.h
parent5d586f7ca0fc81097724d09fc0997137a77ef9dd (diff)
downloadlinux-c48fcb4f49061b8bdda946474215ba8c4e8c27b6.tar.gz
linux-c48fcb4f49061b8bdda946474215ba8c4e8c27b6.tar.bz2
linux-c48fcb4f49061b8bdda946474215ba8c4e8c27b6.zip
net: annotate data-races around sk->sk_tsflags
[ Upstream commit e3390b30a5dfb112e8e802a59c0f68f947b638b2 ] 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> Stable-dep-of: 7f6ca95d16b9 ("net: Implement missing getsockopt(SO_TIMESTAMPING_NEW)") Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'include/net/ip.h')
-rw-r--r--include/net/ip.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/net/ip.h b/include/net/ip.h
index c286344628db..c83c09c65623 100644
--- a/include/net/ip.h
+++ b/include/net/ip.h
@@ -95,7 +95,7 @@ static inline void ipcm_init_sk(struct ipcm_cookie *ipcm,
ipcm_init(ipcm);
ipcm->sockc.mark = READ_ONCE(inet->sk.sk_mark);
- ipcm->sockc.tsflags = inet->sk.sk_tsflags;
+ ipcm->sockc.tsflags = READ_ONCE(inet->sk.sk_tsflags);
ipcm->oif = READ_ONCE(inet->sk.sk_bound_dev_if);
ipcm->addr = inet->inet_saddr;
ipcm->protocol = inet->inet_num;