summaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorEric Dumazet <edumazet@google.com>2023-07-28 17:03:13 +0200
committerDavid S. Miller <davem@davemloft.net>2023-07-29 19:13:41 +0200
commit74bc084327c643499474ba75df485607da37dd6e (patch)
tree9470172e3b51a0d3f1074233295bf2b9c4d66838 /net
parentnet: annotate data-races around sk->sk_{rcv|snd}timeo (diff)
downloadlinux-74bc084327c643499474ba75df485607da37dd6e.tar.xz
linux-74bc084327c643499474ba75df485607da37dd6e.zip
net: add missing READ_ONCE(sk->sk_sndbuf) annotation
In a prior commit, I forgot to change sk_getsockopt() when reading sk->sk_sndbuf locklessly. Fixes: e292f05e0df7 ("tcp: annotate sk->sk_sndbuf lockless reads") Signed-off-by: Eric Dumazet <edumazet@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r--net/core/sock.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/core/sock.c b/net/core/sock.c
index 264c99c190ac..ca43f7a30219 100644
--- a/net/core/sock.c
+++ b/net/core/sock.c
@@ -1639,7 +1639,7 @@ int sk_getsockopt(struct sock *sk, int level, int optname,
break;
case SO_SNDBUF:
- v.val = sk->sk_sndbuf;
+ v.val = READ_ONCE(sk->sk_sndbuf);
break;
case SO_RCVBUF: