]> 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)
commita2b202d9be0408ef5a240cede82f1b50f44d80ca
tree9a5b9cb2833a7c5702e557f6ba1eda7220b9393d
parentbb2c72f3410598f2730201196df3e6d199df18e5
tcp: Fix data-races around sysctl_tcp_recovery.

[ Upstream commit 5148f9fc2f5597496099c538ac4d46a941be3eb6 ]

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

Fixes: 7e0a80dae3ff ("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