From: Andrew Morton Date: Wed, 18 Jan 2006 05:58:01 +0000 (-0800) Subject: [IPV4]: RT_CACHE_STAT_INC() warning fix X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=dbd2915ce87e811165da0717f8e159276ebb803e;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git [IPV4]: RT_CACHE_STAT_INC() warning fix BUG: using smp_processor_id() in preemptible [00000001] code: rpc.statd/2408 And it _is_ a bug, but I guess we don't care enough to add preempt_disable(). Signed-off-by: Andrew Morton Signed-off-by: David S. Miller --- diff --git a/net/ipv4/route.c b/net/ipv4/route.c index f2e82afc15b3..d82c242ea704 100644 --- a/net/ipv4/route.c +++ b/net/ipv4/route.c @@ -241,7 +241,8 @@ static int rt_hash_log; static unsigned int rt_hash_rnd; static DEFINE_PER_CPU(struct rt_cache_stat, rt_cache_stat); -#define RT_CACHE_STAT_INC(field) (__get_cpu_var(rt_cache_stat).field++) +#define RT_CACHE_STAT_INC(field) \ + (per_cpu(rt_cache_stat, raw_smp_processor_id()).field++) static int rt_intern_hash(unsigned hash, struct rtable *rth, struct rtable **res);