]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
tcp: Fix data-races around sysctl_tcp_workaround_signed_windows.
authorKuniyuki Iwashima <kuniyu@amazon.com>
Wed, 20 Jul 2022 16:50:19 +0000 (09:50 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 3 Aug 2022 10:05:29 +0000 (12:05 +0200)
commit5bb0140ea9a9fc87265938ff416312bfe19bfddd
treefeebb5929f875f8e92a19c922a8c5a400dd3f0a9
parent5cd3256fc54d13194bb48857fe2685db293cf175
tcp: Fix data-races around sysctl_tcp_workaround_signed_windows.

[ Upstream commit 0f1e4d06591d0a7907c71f7b6d1c79f8a4de8098 ]

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

Fixes: 15d99e02baba ("[TCP]: sysctl to allow TCP window > 32767 sans wscale")
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