net: add missing READ_ONCE(sk->sk_rcvlowat) annotation
authorEric Dumazet <edumazet@google.com>
Fri, 28 Jul 2023 15:03:11 +0000 (15:03 +0000)
committerDavid S. Miller <davem@davemloft.net>
Sat, 29 Jul 2023 17:13:41 +0000 (18:13 +0100)
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>
net/core/sock.c

index fec18755f7727206a0b8c0d486b14bde2347296e..08e60500160571e46c798e6cd71d56234a516fd3 100644 (file)
@@ -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: