]> git.baikalelectronics.ru Git - kernel.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)
committerDavid S. Miller <davem@davemloft.net>
Fri, 22 Jul 2022 11:06:17 +0000 (12:06 +0100)
commit38bdf925a45ac7e2eec3767ddde4772755ff7956
treeb19509a42f3868a998abbac5c76800a6583e9c93
parent877a50b33322456e5fcb127a5b845288612157b5
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: 6475c3971092 ("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