summaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorEric Dumazet <edumazet@google.com>2023-07-28 17:03:14 +0200
committerDavid S. Miller <davem@davemloft.net>2023-07-29 19:13:41 +0200
commitb4b553253091cafe9ec38994acf42795e073bef5 (patch)
tree8149333f6be70eb6a825d9fa53f085c2cbd31171 /net
parentnet: add missing READ_ONCE(sk->sk_sndbuf) annotation (diff)
downloadlinux-b4b553253091cafe9ec38994acf42795e073bef5.tar.xz
linux-b4b553253091cafe9ec38994acf42795e073bef5.zip
net: add missing READ_ONCE(sk->sk_rcvbuf) annotation
In a prior commit, I forgot to change sk_getsockopt() when reading sk->sk_rcvbuf locklessly. Fixes: ebb3b78db7bf ("tcp: annotate sk->sk_rcvbuf 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 ca43f7a30219..96616eb3869d 100644
--- a/net/core/sock.c
+++ b/net/core/sock.c
@@ -1643,7 +1643,7 @@ int sk_getsockopt(struct sock *sk, int level, int optname,
break;
case SO_RCVBUF:
- v.val = sk->sk_rcvbuf;
+ v.val = READ_ONCE(sk->sk_rcvbuf);
break;
case SO_REUSEADDR: