Skip to content

Commit 74bc084

Browse files
edumazetdavem330
authored andcommitted
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: e292f05 ("tcp: annotate sk->sk_sndbuf lockless reads") Signed-off-by: Eric Dumazet <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 285975d commit 74bc084

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

net/core/sock.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1639,7 +1639,7 @@ int sk_getsockopt(struct sock *sk, int level, int optname,
16391639
break;
16401640

16411641
case SO_SNDBUF:
1642-
v.val = sk->sk_sndbuf;
1642+
v.val = READ_ONCE(sk->sk_sndbuf);
16431643
break;
16441644

16451645
case SO_RCVBUF:

0 commit comments

Comments
 (0)