]> 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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 21 Jul 2022 19:24:26 +0000 (21:24 +0200)
commite0eca20f9f44e5f123f60366d5b7d9d4277b2d2f
treea45362b38a05178b83e18c62c45739d7dd9f7258
parent7818dd8d7de63935f5f50ebececc40e5d4bd3b76
icmp: Fix data-races around sysctl_icmp_echo_enable_probe.

[ Upstream commit f81929d7bae00e78b813879fac8978b59538a513 ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
net/ipv4/icmp.c
net/ipv6/icmp.c