]> git.baikalelectronics.ru Git - kernel.git/commit
tcp: Fix data-races around sk_pacing_rate.
authorKuniyuki Iwashima <kuniyu@amazon.com>
Fri, 22 Jul 2022 18:21:59 +0000 (11:21 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 3 Aug 2022 10:03:51 +0000 (12:03 +0200)
commit7681071b0f48978915a5ce67b5ba16801834f692
treecf3d61deacec0316cf36ad06997e8779117674af
parent369d9ba1a3498ec94075e2b43d6c414c4ed43e21
tcp: Fix data-races around sk_pacing_rate.

[ Upstream commit 90d58471307d2cddecd49df9700fbd51ccf6a02b ]

While reading sysctl_tcp_pacing_(ss|ca)_ratio, they can be changed
concurrently.  Thus, we need to add READ_ONCE() to their readers.

Fixes: 0c515c21e376 ("tcp: refine pacing rate determination")
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_input.c