]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
tcp: Fix a data-race around sysctl_tcp_comp_sack_delay_ns.
authorKuniyuki Iwashima <kuniyu@amazon.com>
Fri, 22 Jul 2022 18:22:01 +0000 (11:22 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 3 Aug 2022 09:59:40 +0000 (11:59 +0200)
commitd42f68a9ceb45023484a2ce11a7f4b9ba1cc4ac2
tree53e30d001d38e95f2871752088766c05a33adda1
parentc2b57a4d3ff6ba2298db974c4e9c35fc9b18db17
tcp: Fix a data-race around sysctl_tcp_comp_sack_delay_ns.

[ Upstream commit 4866b2b0f7672b6d760c4b8ece6fb56f965dcc8a ]

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

Fixes: 6d82aa242092 ("tcp: add tcp_comp_sack_delay_ns sysctl")
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