]> git.baikalelectronics.ru Git - kernel.git/commit
tcp: Fix data-races around sysctl_tcp_min_snd_mss.
authorKuniyuki Iwashima <kuniyu@amazon.com>
Wed, 13 Jul 2022 20:52:02 +0000 (13:52 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 29 Jul 2022 15:14:11 +0000 (17:14 +0200)
commit9c61678a5cd91533ad45382abd58109bd9fbde3d
treefbce678cce3ca04ec6349cc5d027acf79b74ef83
parent2786e7b7f28d55c7c78af88a2241cd2035cb4647
tcp: Fix data-races around sysctl_tcp_min_snd_mss.

[ Upstream commit 7a8aa32db43de3fa5e77b4bf236ef2ad82705d72 ]

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

Fixes: 4ee3ef52952a ("tcp: add tcp_min_snd_mss 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_output.c
net/ipv4/tcp_timer.c