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)
committerDavid S. Miller <davem@davemloft.net>
Fri, 22 Jul 2022 11:06:17 +0000 (12:06 +0100)
commit9fb90193fbd66b4c5409ef729fd081861f8b6351
treeb19509a42f3868a998abbac5c76800a6583e9c93
parent0f1e4d06591d0a7907c71f7b6d1c79f8a4de8098
tcp: Fix a data-race around sysctl_tcp_limit_output_bytes.

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