]> git.baikalelectronics.ru Git - kernel.git/commit
icmp: Fix data-races around sysctl_icmp_echo_enable_probe.
authorKuniyuki Iwashima <kuniyu@amazon.com>
Tue, 12 Jul 2022 00:15:23 +0000 (17:15 -0700)
committerDavid S. Miller <davem@davemloft.net>
Wed, 13 Jul 2022 11:56:49 +0000 (12:56 +0100)
commitf81929d7bae00e78b813879fac8978b59538a513
tree461085e182176e7c4d5385d68b309a3e91826c1d
parenta60a807868be1f442b7796f5c8c3a1ee7e99dbed
icmp: Fix data-races around sysctl_icmp_echo_enable_probe.

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

Fixes: 72aea1cc9c46 ("icmp: add response to RFC 8335 PROBE messages")
Fixes: 2f400e428b52 ("ipv6: ICMPV6: add response to ICMPV6 RFC 8335 PROBE messages")
Signed-off-by: Kuniyuki Iwashima <kuniyu@amazon.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/icmp.c
net/ipv6/icmp.c