diff options
author | Eric Dumazet <edumazet@google.com> | 2023-07-28 18:03:14 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2023-08-11 12:57:48 +0300 |
commit | 11e0590af33383ea3a745ae7452dea4f1f19eba2 (patch) | |
tree | d4400d2ca88b7c11ef65b9e2a106da6138d42a47 | |
parent | dc20f7bada00b550b3fd2855ec910a33460ed357 (diff) | |
download | linux-11e0590af33383ea3a745ae7452dea4f1f19eba2.tar.xz |
net: add missing READ_ONCE(sk->sk_rcvbuf) annotation
[ Upstream commit b4b553253091cafe9ec38994acf42795e073bef5 ]
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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
-rw-r--r-- | net/core/sock.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/core/sock.c b/net/core/sock.c index 6f422882d34f..708018b58e90 100644 --- a/net/core/sock.c +++ b/net/core/sock.c @@ -1336,7 +1336,7 @@ int sock_getsockopt(struct socket *sock, int level, int optname, break; case SO_RCVBUF: - v.val = sk->sk_rcvbuf; + v.val = READ_ONCE(sk->sk_rcvbuf); break; case SO_REUSEADDR: |