]> git.baikalelectronics.ru Git - kernel.git/commit
tcp: Fix a data-race around sysctl_max_tw_buckets.
authorKuniyuki Iwashima <kuniyu@amazon.com>
Tue, 12 Jul 2022 00:15:21 +0000 (17:15 -0700)
committerDavid S. Miller <davem@davemloft.net>
Wed, 13 Jul 2022 11:56:49 +0000 (12:56 +0100)
commit7777dbe5abf25c04f703f4dd51dbac46e50a52a7
tree762f1a37b0bd207f332e9dd4ff310a8319da0702
parente9a3c864e5f9d0795b52c1f8b0f8cac39dad717a
tcp: Fix a data-race around sysctl_max_tw_buckets.

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

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/ipv4/inet_timewait_sock.c