Skip to content

Commit

Permalink
[IPV4]: RT_CACHE_STAT_INC() warning fix
Browse files Browse the repository at this point in the history
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 <akpm@osdl.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Andrew Morton authored and David S. Miller committed Jan 18, 2006
1 parent 7eb9b2f commit dbd2915
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion net/ipv4/route.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit dbd2915

Please sign in to comment.