From fd6b69ec9a4f72a0617c066bd1906de5d6bba25f Mon Sep 17 00:00:00 2001 From: Eric Dumazet Date: Fri, 31 May 2019 19:09:02 -0700 Subject: [PATCH] ipv4: icmp: use this_cpu_read() in icmp_sk() this_cpu_read(*X) is faster than *this_cpu_ptr(X) Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller --- net/ipv4/icmp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/ipv4/icmp.c b/net/ipv4/icmp.c index 005bc38bcdde..a51ce2f1bb72 100644 --- a/net/ipv4/icmp.c +++ b/net/ipv4/icmp.c @@ -206,7 +206,7 @@ static const struct icmp_control icmp_pointers[NR_ICMP_TYPES+1]; */ static struct sock *icmp_sk(struct net *net) { - return *this_cpu_ptr(net->ipv4.icmp_sk); + return this_cpu_read(*net->ipv4.icmp_sk); } /* Called with BH disabled */