]> git.baikalelectronics.ru Git - kernel.git/commit
tcp: Fix a data-race around sysctl_tcp_min_tso_segs.
authorKuniyuki Iwashima <kuniyu@amazon.com>
Wed, 20 Jul 2022 16:50:22 +0000 (09:50 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 3 Aug 2022 10:03:48 +0000 (12:03 +0200)
commit27333ee0c924546cd3dbcfee6f569a0cef659a97
treed0890ceb5f7f2dfc01040bc812ef5f224c6b2703
parent3ee568f1250ccc591ec0fbc6d742bbbcd2cf2c8e
tcp: Fix a data-race around sysctl_tcp_min_tso_segs.

[ Upstream commit 326666362e7146327c6fbb44affccae710494b93 ]

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

Fixes: 6249207108ef ("tcp: TSO packets automatic sizing")
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