tcp: Fix data-races around sysctl_tcp_syncookies.
authorKuniyuki Iwashima <kuniyu@amazon.com>
Fri, 15 Jul 2022 17:17:47 +0000 (10:17 -0700)
committerDavid S. Miller <davem@davemloft.net>
Mon, 18 Jul 2022 11:21:54 +0000 (12:21 +0100)
commitf2e383b5bb6bbc60a0b94b87b3e49a2b1aefd11e
treed086482c4486c23c9ea6ebeb523b1251872086d4
parent20a3b1c0f603e8c55c3396abd12dfcfb523e4d3c
tcp: Fix data-races around sysctl_tcp_syncookies.

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

Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
Signed-off-by: Kuniyuki Iwashima <kuniyu@amazon.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/core/filter.c
net/ipv4/syncookies.c
net/ipv4/tcp_input.c
net/ipv6/syncookies.c