Skip to content

Commit

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

Fixes: ebb3b78 ("tcp: annotate sk->sk_rcvbuf 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 74bc084 commit b4b5532
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 @@ -1643,7 +1643,7 @@ int sk_getsockopt(struct sock *sk, int level, int optname,
break;

case SO_RCVBUF:
v.val = sk->sk_rcvbuf;
v.val = READ_ONCE(sk->sk_rcvbuf);
break;

case SO_REUSEADDR:
Expand Down

0 comments on commit b4b5532

Please sign in to comment.