diff --git a/net/ipv4/icmp.c b/net/ipv4/icmp.c index 9483c2a16b78d25ba0e8c46e0236bfa3442a194d..0fa0da1d71f57fe3cf1626d954453d5759cbb4c2 100644 --- a/net/ipv4/icmp.c +++ b/net/ipv4/icmp.c @@ -290,7 +290,7 @@ static bool icmpv4_mask_allow(struct net *net, int type, int code) return true; /* Limit if icmp type is enabled in ratemask. */ - if (!((1 << type) & net->ipv4.sysctl_icmp_ratemask)) + if (!((1 << type) & READ_ONCE(net->ipv4.sysctl_icmp_ratemask))) return true; return false;