tcp: Fix a data-race around sysctl_tcp_early_retrans.
authorKuniyuki Iwashima <kuniyu@amazon.com>
Mon, 18 Jul 2022 17:26:45 +0000 (10:26 -0700)
committerDavid S. Miller <davem@davemloft.net>
Wed, 20 Jul 2022 09:14:49 +0000 (10:14 +0100)
commit52e65865deb6a36718a463030500f16530eaab74
treee69d74e770aa2e2ff1b336baf7dddd08caf01377
parent3666f666e99600518ab20982af04a078bbdad277
tcp: Fix a data-race around sysctl_tcp_early_retrans.

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

Fixes: eed530b6c676 ("tcp: early retransmit")
Signed-off-by: Kuniyuki Iwashima <kuniyu@amazon.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/tcp_output.c