tcp: Fix data-races around sysctl_tcp_fastopen_blackhole_timeout.
authorKuniyuki Iwashima <kuniyu@amazon.com>
Fri, 15 Jul 2022 17:17:55 +0000 (10:17 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 29 Jul 2022 15:25:19 +0000 (17:25 +0200)
commita77a75a0e7f397550ab039f96115103e78dd5c69
treebc029eac6f0476f07b8fbfd9f8f9757335587d73
parent539d9ab79eba3974b479cad61a8688c41fe62e12
tcp: Fix data-races around sysctl_tcp_fastopen_blackhole_timeout.

[ Upstream commit 021266ec640c7a4527e6cd4b7349a512b351de1d ]

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

Fixes: cf1ef3f0719b ("net/tcp_fastopen: Disable active side TFO in certain scenarios")
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>
net/ipv4/tcp_fastopen.c