diff options
| author | Kuniyuki Iwashima <[email protected]> | 2022-07-13 20:52:00 +0000 |
|---|---|---|
| committer | David S. Miller <[email protected]> | 2022-07-15 10:49:55 +0000 |
| commit | f47d00e077e7d61baf69e46dde3210c886360207 (patch) | |
| tree | bfd718a178b32898319aa4f2f771f5651cebb74c /net/ipv4/tcp_timer.c | |
| parent | tcp: Fix data-races around sysctl_tcp_l3mdev_accept. (diff) | |
| download | kernel-f47d00e077e7d61baf69e46dde3210c886360207.tar.gz kernel-f47d00e077e7d61baf69e46dde3210c886360207.zip | |
tcp: Fix data-races around sysctl_tcp_mtu_probing.
While reading sysctl_tcp_mtu_probing, it can be changed concurrently.
Thus, we need to add READ_ONCE() to its readers.
Fixes: 5d424d5a674f ("[TCP]: MTU probing")
Signed-off-by: Kuniyuki Iwashima <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
Diffstat (limited to 'net/ipv4/tcp_timer.c')
| -rw-r--r-- | net/ipv4/tcp_timer.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/ipv4/tcp_timer.c b/net/ipv4/tcp_timer.c index 20cf4a98c69d..98bb00e29e1e 100644 --- a/net/ipv4/tcp_timer.c +++ b/net/ipv4/tcp_timer.c @@ -163,7 +163,7 @@ static void tcp_mtu_probing(struct inet_connection_sock *icsk, struct sock *sk) int mss; /* Black hole detection */ - if (!net->ipv4.sysctl_tcp_mtu_probing) + if (!READ_ONCE(net->ipv4.sysctl_tcp_mtu_probing)) return; if (!icsk->icsk_mtup.enabled) { |
