Skip to content

Commit

Permalink
net: add missing READ_ONCE(sk->sk_rcvlowat) annotation
Browse files Browse the repository at this point in the history
In a prior commit, I forgot to change sk_getsockopt()
when reading sk->sk_rcvlowat locklessly.

Fixes: eac6640 ("net: annotate sk->sk_rcvlowat lockless reads")
Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Eric Dumazet authored and David S. Miller committed Jul 29, 2023
1 parent ea7f45e commit e6d12bd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/core/sock.c
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit e6d12bd

Please sign in to comment.