]> git.baikalelectronics.ru Git - kernel.git/commit
tcp: Fix a data-race around sysctl_tcp_probe_threshold.
authorKuniyuki Iwashima <kuniyu@amazon.com>
Wed, 13 Jul 2022 20:52:04 +0000 (13:52 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 29 Jul 2022 15:14:12 +0000 (17:14 +0200)
commit71aae06d9b350ad2c30eccf79def6310a3331a23
tree64c647c1b658e9f4d54a67ad6ed42c2fdc979987
parent39a332ea4dd0e8f8d9db16f5e4ebd44a31f2ef97
tcp: Fix a data-race around sysctl_tcp_probe_threshold.

[ Upstream commit f6151e323c7bdaaa3cf1b9a9ab9114c8b9dbf17a ]

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

Fixes: 043aaca9934f ("ipv4: Use binary search to choose tcp PMTU probe_size")
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_output.c