summaryrefslogtreecommitdiffstats
path: root/net/core/sock.c
diff options
context:
space:
mode:
authorEric Dumazet <edumazet@google.com>2023-07-28 15:03:11 +0000
committerDavid S. Miller <davem@davemloft.net>2023-07-29 18:13:41 +0100
commite6d12bdb435d23ff6c1890c852d85408a2f496ee (patch)
treec317d166387c93dfdb064d33730ae4e2e9226fe5 /net/core/sock.c
parentea7f45ef77b39e72244d282e47f6cb1ef4135cd2 (diff)
downloadlinux-e6d12bdb435d23ff6c1890c852d85408a2f496ee.tar.gz
linux-e6d12bdb435d23ff6c1890c852d85408a2f496ee.tar.bz2
linux-e6d12bdb435d23ff6c1890c852d85408a2f496ee.zip
net: add missing READ_ONCE(sk->sk_rcvlowat) annotation
In a prior commit, I forgot to change sk_getsockopt() when reading sk->sk_rcvlowat locklessly. Fixes: eac66402d1c3 ("net: annotate sk->sk_rcvlowat lockless reads") Signed-off-by: Eric Dumazet <edumazet@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/core/sock.c')
-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 fec18755f772..08e605001605 100644
--- a/net/core/sock.c
+++ b/net/core/sock.c
@@ -1730,7 +1730,7 @@ int sk_getsockopt(struct sock *sk, int level, int optname,
break;
case SO_RCVLOWAT:
- v.val = sk->sk_rcvlowat;
+ v.val = READ_ONCE(sk->sk_rcvlowat);
break;
case SO_SNDLOWAT: