tcp: Fix data-races around keepalive sysctl knobs.
authorKuniyuki Iwashima <kuniyu@amazon.com>
Fri, 15 Jul 2022 17:17:45 +0000 (10:17 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 29 Jul 2022 15:25:17 +0000 (17:25 +0200)
commit906beda70c2f12a452d202692f0d59f7a40e1d9c
tree829f9ddbbd26fbff377e1c4d37354378cadc4302
parent849450279dfcbdfcadfc8b8552e0fe10a8edf33d
tcp: Fix data-races around keepalive sysctl knobs.

[ Upstream commit f2f316e287e6c2e3a1c5bab8d9b77ee03daa0463 ]

While reading sysctl_tcp_keepalive_(time|probes|intvl), 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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
include/net/tcp.h
net/smc/smc_llc.c