]> git.baikalelectronics.ru Git - kernel.git/commit
tcp: Fix a data-race around sysctl_tcp_thin_linear_timeouts.
authorKuniyuki Iwashima <kuniyu@amazon.com>
Mon, 18 Jul 2022 17:26:47 +0000 (10:26 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 29 Jul 2022 15:14:15 +0000 (17:14 +0200)
commit29284652298788c1348940c1bc9d57ff6387202f
treeec6baa6e2447f853c9c301757081be15641f8bfe
parenta2b202d9be0408ef5a240cede82f1b50f44d80ca
tcp: Fix a data-race around sysctl_tcp_thin_linear_timeouts.

[ Upstream commit 355c4a1792b5310817218b24c36a279f8148bd04 ]

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

Fixes: 0abed800963b ("net: TCP thin linear timeouts")
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_timer.c