Skip to content

Commit

Permalink
net: add missing READ_ONCE(sk->sk_sndbuf) 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_sndbuf locklessly.

Fixes: e292f05 ("tcp: annotate sk->sk_sndbuf 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 285975d commit 74bc084
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 @@ -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:
Expand Down

0 comments on commit 74bc084

Please sign in to comment.