tcp: Fix data-races around sysctl_tcp_slow_start_after_idle.
authorKuniyuki Iwashima <kuniyu@amazon.com>
Mon, 18 Jul 2022 17:26:48 +0000 (10:26 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 29 Jul 2022 15:25:22 +0000 (17:25 +0200)
commit41aeba4506f6b70ec7500c6fe202731a4ba29fe5
treed74b40c2dc4ae7b2153b4cd82d19b38b571ee89e
parent404c53ccdebd11f96954f4070cffac8e0b4d5cb6
tcp: Fix data-races around sysctl_tcp_slow_start_after_idle.

[ Upstream commit 4845b5713ab18a1bb6e31d1fbb4d600240b8b691 ]

While reading sysctl_tcp_slow_start_after_idle, it can be changed
concurrently.  Thus, we need to add READ_ONCE() to its readers.

Fixes: 35089bb203f4 ("[TCP]: Add tcp_slow_start_after_idle sysctl.")
Signed-off-by: Kuniyuki Iwashima <kuniyu@amazon.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
include/net/tcp.h
net/ipv4/tcp_output.c