]> git.baikalelectronics.ru Git - kernel.git/commit
icmp: Fix data-races around sysctl.
authorKuniyuki Iwashima <kuniyu@amazon.com>
Wed, 6 Jul 2022 23:40:02 +0000 (16:40 -0700)
committerDavid S. Miller <davem@davemloft.net>
Fri, 8 Jul 2022 11:10:34 +0000 (12:10 +0100)
commitae90c421c5d3286b9a4eee867deb3beac67e1e4c
tree00ac31005a3bd8dd7c3cb04c2e909c927967ee1c
parent859c4570aed8053d6fe069dcd709133d2b2711ce
icmp: Fix data-races around sysctl.

While reading icmp sysctl variables, they can be changed concurrently.
So, we need to add READ_ONCE() to avoid data-races.

Fixes: 0fcdcc7c3da1 ("icmp: add a global rate limitation")
Signed-off-by: Kuniyuki Iwashima <kuniyu@amazon.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/icmp.c