]> 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 09:59:39 +0000 (11:59 +0200)
commite08eab1602c54bdd2634c4b19077add730c3ab82
treee20b5612184b78af17bec094102ca5b3f1196905
parenta3cdf94664db0a492a040d561aceaa2962ff2e15
tcp: Fix a data-race around sysctl_tcp_min_tso_segs.

[ Upstream commit 04a7643fc9bf7fa271241a6c9ec1f4fdb7c3edcf ]

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

Fixes: 2a37deeea71c ("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