]> git.baikalelectronics.ru Git - kernel.git/commit
tcp: Fix data-races around sysctl_tcp_fastopen.
authorKuniyuki Iwashima <kuniyu@amazon.com>
Fri, 15 Jul 2022 17:17:54 +0000 (10:17 -0700)
committerDavid S. Miller <davem@davemloft.net>
Mon, 18 Jul 2022 11:21:54 +0000 (12:21 +0100)
commit3a16c6c5bdd6ceb3ea7482b254943078856986a3
tree35efe5034a35dcd8dbee8b0d93d7c03b48dc2d87
parent961be9f7358009b3eea91748cc9cc2b5ec0fc13a
tcp: Fix data-races around sysctl_tcp_fastopen.

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

Fixes: fd5762955c33 ("net-tcp: Fast Open base")
Signed-off-by: Kuniyuki Iwashima <kuniyu@amazon.com>
Acked-by: Yuchung Cheng <ycheng@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/af_inet.c
net/ipv4/tcp.c
net/ipv4/tcp_fastopen.c