tcp: Fix data-races around sysctl_tcp_syn(ack)?_retries.
authorKuniyuki Iwashima <kuniyu@amazon.com>
Fri, 15 Jul 2022 17:17:46 +0000 (10:17 -0700)
committerDavid S. Miller <davem@davemloft.net>
Mon, 18 Jul 2022 11:21:54 +0000 (12:21 +0100)
commit20a3b1c0f603e8c55c3396abd12dfcfb523e4d3c
treede4a9c1b28887f2a09cdbb7b087a8f1005b51bde
parentf2f316e287e6c2e3a1c5bab8d9b77ee03daa0463
tcp: Fix data-races around sysctl_tcp_syn(ack)?_retries.

While reading sysctl_tcp_syn(ack)?_retries, they can be changed
concurrently.  Thus, we need to add READ_ONCE() to their readers.

Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
Signed-off-by: Kuniyuki Iwashima <kuniyu@amazon.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/inet_connection_sock.c
net/ipv4/tcp.c
net/ipv4/tcp_timer.c