Commit ee3743b5 authored by Andrew Morton's avatar Andrew Morton Committed by David S. Miller

[NET]: neigh_stat preempt fix

On some code paths this code is playing with per-cpu data with preemption
enabled.
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 8888c5d7
......@@ -112,7 +112,11 @@ struct neigh_statistics
};
#define NEIGH_CACHE_STAT_INC(tbl, field) \
(per_cpu_ptr((tbl)->stats, smp_processor_id())->field++)
do { \
preempt_disable(); \
(per_cpu_ptr((tbl)->stats, smp_processor_id())->field)++; \
preempt_enable(); \
} while (0)
struct neighbour
{
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment