]> git.baikalelectronics.ru Git - kernel.git/commit
tcp: Fix data-races around sysctl_tcp_no_ssthresh_metrics_save.
authorKuniyuki Iwashima <kuniyu@amazon.com>
Wed, 20 Jul 2022 16:50:17 +0000 (09:50 -0700)
committerDavid S. Miller <davem@davemloft.net>
Fri, 22 Jul 2022 11:06:17 +0000 (12:06 +0100)
commit7b8512603083cf7666210748820e9b22a8977b2a
tree4d454799a04c360beb15452bb5f1f0a1dea08b8e
parent87ba594f7debe5939db9c71badd898b3590eee6d
tcp: Fix data-races around sysctl_tcp_no_ssthresh_metrics_save.

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

Fixes: 1cb407385d84 ("net-tcp: Disable TCP ssthresh metrics cache by default")
Signed-off-by: Kuniyuki Iwashima <kuniyu@amazon.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/tcp_metrics.c