]> git.baikalelectronics.ru Git - kernel.git/commit
tcp: Fix a data-race around sysctl_tcp_min_rtt_wlen.
authorKuniyuki Iwashima <kuniyu@amazon.com>
Wed, 20 Jul 2022 16:50:24 +0000 (09:50 -0700)
committerDavid S. Miller <davem@davemloft.net>
Fri, 22 Jul 2022 11:06:18 +0000 (12:06 +0100)
commit4509ae5160b2decbd4fc8ddecadf403055cb3d24
tree71218211e3caa701d1232cbd2c30248d338802eb
parent5293adca2ee6d7cd9574423580881d1b01b7a36d
tcp: Fix a data-race around sysctl_tcp_min_rtt_wlen.

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

Fixes: 50bc59fc3444 ("tcp: track min RTT using windowed min-filter")
Signed-off-by: Kuniyuki Iwashima <kuniyu@amazon.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/tcp_input.c