From: Eric Dumazet Date: Sat, 1 Jun 2019 02:09:02 +0000 (-0700) Subject: ipv4: icmp: use this_cpu_read() in icmp_sk() X-Git-Tag: v5.4-rc1~616^2~351 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=046386ca0c48cca1d91563db63a8eb0aff71f2b7;p=platform%2Fkernel%2Flinux-rpi.git 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 --- diff --git a/net/ipv4/icmp.c b/net/ipv4/icmp.c index f3a5893..49d6b03 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 */