]> git.baikalelectronics.ru Git - kernel.git/commit
tcp: Fix data-races around sysctl_tcp_moderate_rcvbuf.
authorKuniyuki Iwashima <kuniyu@amazon.com>
Wed, 20 Jul 2022 16:50:18 +0000 (09:50 -0700)
committerDavid S. Miller <davem@davemloft.net>
Fri, 22 Jul 2022 11:06:17 +0000 (12:06 +0100)
commit1ff88caed72288aad6ae135bdd8a5b64d40c2269
tree1c5eccb931a4222e45ac290ef3c7334db3a0df50
parent3ac007ed04c936aa7f5bb66f8ebb4a78f7e0af41
tcp: Fix data-races around sysctl_tcp_moderate_rcvbuf.

While reading sysctl_tcp_moderate_rcvbuf, 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/ipv4/tcp_input.c
net/mptcp/protocol.c