]> git.baikalelectronics.ru Git - kernel.git/commit
tcp: Fix data-races around sysctl_tcp_recovery.
authorKuniyuki Iwashima <kuniyu@amazon.com>
Mon, 18 Jul 2022 17:26:46 +0000 (10:26 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 29 Jul 2022 15:14:15 +0000 (17:14 +0200)
commit3bb82dad94da33aa5cad0963dea0f9aa8ea141cd
tree9a5b9cb2833a7c5702e557f6ba1eda7220b9393d
parent08d3b426af2c26b7056c26c10acd18e5be3b73e0
tcp: Fix data-races around sysctl_tcp_recovery.

[ Upstream commit 583974f8253d46d0042d6c94d8b846dd35e4618d ]

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

Fixes: 9c201ccfcd85 ("tcp: use RACK to detect losses")
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_input.c
net/ipv4/tcp_recovery.c