Skip to content

Commit b4b5532

Browse files
edumazetdavem330
authored andcommitted
net: add missing READ_ONCE(sk->sk_rcvbuf) annotation
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 <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 74bc084 commit b4b5532

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
@@ -1643,7 +1643,7 @@ int sk_getsockopt(struct sock *sk, int level, int optname,
16431643
break;
16441644

16451645
case SO_RCVBUF:
1646-
v.val = sk->sk_rcvbuf;
1646+
v.val = READ_ONCE(sk->sk_rcvbuf);
16471647
break;
16481648

16491649
case SO_REUSEADDR:

0 commit comments

Comments
 (0)