]> git.baikalelectronics.ru Git - kernel.git/commit
tcp: Fix a data-race around sysctl_tcp_invalid_ratelimit.
authorKuniyuki Iwashima <kuniyu@amazon.com>
Wed, 20 Jul 2022 16:50:26 +0000 (09:50 -0700)
committerDavid S. Miller <davem@davemloft.net>
Fri, 22 Jul 2022 11:06:18 +0000 (12:06 +0100)
commit8a546f9373e2f7b8da843bab80c843e4d72969f4
tree1671e0ab895d93a261db38e1ef1e4c313537fd9f
parent19ea5d82bf8a1597152f84b9887e1887cc5b3641
tcp: Fix a data-race around sysctl_tcp_invalid_ratelimit.

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

Fixes: 7b805d602346 ("tcp: helpers to mitigate ACK loops by rate-limiting out-of-window dupacks")
Signed-off-by: Kuniyuki Iwashima <kuniyu@amazon.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/tcp_input.c