ip: Fix data-races around sysctl_ip_no_pmtu_disc.
authorKuniyuki Iwashima <kuniyu@amazon.com>
Wed, 13 Jul 2022 20:51:52 +0000 (13:51 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 29 Jul 2022 15:25:13 +0000 (17:25 +0200)
commit01083e3f9868a96e678496136cef195a89e292f9
treef3731e6bc5bdd36ad6b3fa4e3e093f8cb59fa0a7
parente75b73081f1ec169518773626c2ff3950476660b
ip: Fix data-races around sysctl_ip_no_pmtu_disc.

[ Upstream commit 0968d2a441bf6afb551fd99e60fa65ed67068963 ]

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

Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
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/af_inet.c
net/ipv4/icmp.c
net/ipv6/af_inet6.c
net/xfrm/xfrm_state.c