Re: 2.6.9-rc3-mm2

Andrew Morton
2004-10-04T21:33:09Z

Grant Wilson <gww@btinternet.com> wrote:
>
> Andrew Morton wrote:
> [snip]
>
> >>IP: routing cache hash table of 4096 buckets, 32KBytes
> >>kmem_cache_create: Early error in slab ip_fib_hash
> >>-----[ cut here ] -----
> >>kernel BUG at mm/slab.c:1185!
> >>invalid operand: 0000 [#1]
> >>PREEMPT
>
> [snip]
>
> I am hitting the same stop on my amd64 box. With your patch the
> following is reported:
>
> in_interrupt(): 268435200 (ie 0x0fffff00)
> preempt_count(): ffffffff

heh, OK, someone goofed there.

Could you try this patch? It'll locate the bug for us.

--- 25/include/linux/preempt.h~a Mon Oct 4 14:31:24 2004
+++ 25-akpm/include/linux/preempt.h Mon Oct 4 14:31:49 2004
@@ -19,6 +19,8 @@ do { \
#define dec_preempt_count() \
do { \
preempt_count()--; \
+ if (preempt_count() == -1) \
+ *(char *)0 = 0; \
} while (0)

#ifdef CONFIG_PREEMPT
_

(I'd have used BUG, but that might cause inclusion problems)