]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
tcp: Fix a data-race around sysctl_tcp_limit_output_bytes.
authorKuniyuki Iwashima <kuniyu@amazon.com>
Wed, 20 Jul 2022 16:50:20 +0000 (09:50 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 3 Aug 2022 10:05:22 +0000 (12:05 +0200)
commit2d4794f26e703e7ac02a4bb9c4e02de6185f1f0a
treed717f71d636b508ad5ed5adbb896416beeccee0d
parent0a6832cfe166d435a3439b6342be24b630cfd7d6
tcp: Fix a data-race around sysctl_tcp_limit_output_bytes.

commit 9fb90193fbd66b4c5409ef729fd081861f8b6351 upstream.

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

Fixes: 46d3ceabd8d9 ("tcp: TCP Small Queues")
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>
net/ipv4/tcp_output.c