lkml.org 
[lkml]   [2004]   [Oct]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: 2.6.9-rc3-mm2

* Andrew Morton <akpm@osdl.org> wrote:

> Andrew Morton <akpm@osdl.org> wrote:
> >
> > You're the second person who is seeing in_interrupt() returning true when
> > clearly it should not be doing so. Ingo, did you do soemthing which might
> > have caused this?
>
> I'm suspecting that something is causing preempt_count() to overflow
> into the softirq counter. An imbalanced preempt_disable(), for
> example.

yes, that was it. Must not put side-effects into a macro that is NOP on
!SMP.

Ingo

Signed-off-by: Ingo Molnar <mingo@elte.hu>

--- linux/include/net/neighbour.h.orig
+++ linux/include/net/neighbour.h
@@ -113,8 +113,9 @@ struct neigh_statistics

#define NEIGH_CACHE_STAT_INC(tbl, field) \
do { \
- (per_cpu_ptr((tbl)->stats, get_cpu())->field)++; \
- put_cpu(); \
+ preempt_disable(); \
+ (per_cpu_ptr((tbl)->stats, smp_processor_id())->field)++; \
+ preempt_enable(); \
} while (0)

struct neighbour
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
\
 
 \ /
  Last update: 2005-03-22 14:06    [W:0.051 / U:0.332 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site