From: Eric Dumazet Date: Fri, 28 Jul 2023 15:03:13 +0000 (+0000) Subject: net: add missing READ_ONCE(sk->sk_sndbuf) annotation X-Git-Tag: v6.6.7~2249^2~29^2~5 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=74bc084327c643499474ba75df485607da37dd6e;p=platform%2Fkernel%2Flinux-starfive.git 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 Signed-off-by: David S. Miller --- diff --git a/net/core/sock.c b/net/core/sock.c index 264c99c..ca43f7a 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: