summaryrefslogtreecommitdiff
path: root/net/socket.c
diff options
context:
space:
mode:
authorEric Dumazet <edumazet@google.com>2023-08-31 16:52:12 +0300
committerDavid S. Miller <davem@davemloft.net>2023-09-01 09:27:33 +0300
commit251cd405a9e6e70b92fe5afbdd17fd5caf9d3266 (patch)
tree2f6da55bba512e4b3f850f583298d661d701e7cd /net/socket.c
parente3390b30a5dfb112e8e802a59c0f68f947b638b2 (diff)
downloadlinux-251cd405a9e6e70b92fe5afbdd17fd5caf9d3266.tar.xz
net: annotate data-races around sk->sk_bind_phc
sk->sk_bind_phc is read locklessly. Add corresponding annotations. Fixes: d463126e23f1 ("net: sock: extend SO_TIMESTAMPING for PHC binding") Signed-off-by: Eric Dumazet <edumazet@google.com> Cc: Yangbo Lu <yangbo.lu@nxp.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/socket.c')
-rw-r--r--net/socket.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/socket.c b/net/socket.c
index 98ffffab949e..928b05811cfd 100644
--- a/net/socket.c
+++ b/net/socket.c
@@ -939,7 +939,7 @@ void __sock_recv_timestamp(struct msghdr *msg, struct sock *sk,
if (tsflags & SOF_TIMESTAMPING_BIND_PHC)
hwtstamp = ptp_convert_timestamp(&hwtstamp,
- sk->sk_bind_phc);
+ READ_ONCE(sk->sk_bind_phc));
if (ktime_to_timespec64_cond(hwtstamp, tss.ts + 2)) {
empty = 0;