]> git.baikalelectronics.ru Git - kernel.git/commit
tcp: Fix data-races around some timeout sysctl knobs.
authorKuniyuki Iwashima <kuniyu@amazon.com>
Fri, 15 Jul 2022 17:17:50 +0000 (10:17 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 29 Jul 2022 15:14:13 +0000 (17:14 +0200)
commit84fd8cd1c862e027f57a344001525b50d23ce353
treea7899da7db8971c365c2e1dd38d701dfcea30e49
parentcf5299bec42d448b092f56c7e718e54b3861ea16
tcp: Fix data-races around some timeout sysctl knobs.

[ Upstream commit c503b3ce61a365bc55f8f026eadaf0a6106be89e ]

While reading these sysctl knobs, they can be changed concurrently.
Thus, we need to add READ_ONCE() to their readers.

  - tcp_retries1
  - tcp_retries2
  - tcp_orphan_retries
  - tcp_fin_timeout

Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
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>
include/net/tcp.h
net/ipv4/tcp.c
net/ipv4/tcp_output.c
net/ipv4/tcp_timer.c