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

[ Upstream commit 19ea5d82bf8a1597152f84b9887e1887cc5b3641 ]

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

Fixes: 4aed7f27920e ("tcp: auto corking")
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.c