]> git.baikalelectronics.ru Git - kernel.git/commit
tcp: Fix a data-race around sysctl_tcp_adv_win_scale.
authorKuniyuki Iwashima <kuniyu@amazon.com>
Wed, 20 Jul 2022 16:50:14 +0000 (09:50 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 3 Aug 2022 09:59:38 +0000 (11:59 +0200)
commit62acec030edfe93f608ed6119ae0003166537da1
tree6ad8752d1ccb6257774a1afe6ee7747b1c10c538
parent6cfbd882071bec291c0075fab962cd2bfecf30d0
tcp: Fix a data-race around sysctl_tcp_adv_win_scale.

commit 506d6d208a26d53f4dbd9cc0f1cfbb4ec70f9a29 upstream.

While reading sysctl_tcp_adv_win_scale, 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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
include/net/tcp.h