tcp: annotate lockless access to sk->sk_err
authorEric Dumazet <edumazet@google.com>
Wed, 15 Mar 2023 20:57:44 +0000 (20:57 +0000)
committerDavid S. Miller <davem@davemloft.net>
Fri, 17 Mar 2023 08:25:05 +0000 (08:25 +0000)
commite13ec3da05d130f0d10da8e1fbe1be26dcdb0e27
tree87c774f8a05afcf7ae1993b2fb1b2416bbabc922
parent2f2d9972affae1f3282eff97c794cf843aedf61e
tcp: annotate lockless access to sk->sk_err

tcp_poll() reads sk->sk_err without socket lock held/owned.

We should used READ_ONCE() here, and update writers
to use WRITE_ONCE().

Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/tcp.c
net/ipv4/tcp_input.c
net/ipv4/tcp_ipv4.c
net/ipv4/tcp_output.c
net/ipv4/tcp_timer.c
net/ipv6/tcp_ipv6.c