

On some code paths this code is playing with per-cpu data with preemption
enabled.

Signed-off-by: Andrew Morton <akpm@osdl.org>
---

 25-akpm/include/net/neighbour.h |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletion(-)

diff -puN include/net/neighbour.h~neigh_stat-preempt-fix include/net/neighbour.h
--- 25/include/net/neighbour.h~neigh_stat-preempt-fix	2004-10-20 01:15:53.847949352 -0700
+++ 25-akpm/include/net/neighbour.h	2004-10-20 01:15:57.263430120 -0700
@@ -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
 {
_
