OSDN Git Service

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)
commit48d7ee321ea5182c6a70782aa186422a70e67e22
tree00ac31005a3bd8dd7c3cb04c2e909c927967ee1c
parentdd44f04b9214adb68ef5684ae87a81ba03632250
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: 4cdf507d5452 ("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