Re: kernel BUG at mm/slab.c:1488! (2.6.13.2)

From: Davi Arnaut
Date: Fri Oct 28 2005 - 05:44:52 EST


On 10/28/05, Andrew Morton <akpm@xxxxxxxx> wrote:
> Davi Arnaut <davi.lkml@xxxxxxxxx> wrote:
> >
> > > It seems that something still tries to load the ext3 module, and I get the
> > > BUG seen below. If I remove the ext3 module and re-build the initrd,
> > > the error goes away.
>
> Yes, I think the kernel is overreacting here.
>
> Manfred, what sayest thou?
>
> (nb: untested)
>
>
> From: Andrew Morton <akpm@xxxxxxxx>
>
> slab presently goes BUG if someone tries to register an already-registered
> cache.
>
> But this can happen if the user accidentally loads a module which is already
> statically linked into the kernel. Nuking the kernel is rather a harsh
> reaction.
>
> Change it into a warning, and just fail the kmem_cache_alloc() attempt. If
> the module is well-behaved, the modprobe will fail and all is well.

How about really fixing kmem_cache_* to use the proper return conventions ?
In this case it should have returned ERR_PTR(-EEXIST);

> Notes:
>
> - Swaps the ranking of cache_chain_sem and lock_cpu_hotplug(). Doesn't seem
> important.
>
>
> <sniped>
>
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/