Re: 2.6.0-test1 oops mm/slab.c:1631

Manfred Spraul (manfred@colorfullife.com)
Mon, 14 Jul 2003 19:37:07 +0200


This is a MIME-formatted message. If you see this text it means that your
E-mail software does not support MIME-formatted messages.

--=_courier-11405-1058204587-0001-2
Content-Type: text/plain; charset=iso-8859-1; format=flowed
Content-Transfer-Encoding: 7bit

Nicolas wrote:

>kernel BUG at mm/slab.c:1631!
>
That's
BUG_ON(GET_PAGE_CACHE(page) != cachep);

Someone called kmem_cache_free(cachep, obj), but cachep is for a
different object type.

>Call Trace:
>[sys_open+120/133] sys_open+0x78/0x85
>
Within sys_open - probably putname().
I have no idea how the bug could be triggered. If you can easily
reproduce it: can you try the attached patch? It prints additional data.

And please add more details: Which gcc compiler, which filesystems, etc.

--
    Manfred

--=_courier-11405-1058204587-0001-2 Content-Type: text/plain; name=patch-slab-cachedebug; charset=iso-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="patch-slab-cachedebug"

--- 2.5/mm/slab.c 2003-07-10 23:27:00.000000000 +0200 +++ build-2.5/mm/slab.c 2003-07-14 19:36:26.000000000 +0200 @@ -1628,7 +1628,13 @@ kfree_debugcheck(objp); page = virt_to_page(objp); - BUG_ON(GET_PAGE_CACHE(page) != cachep); + if (GET_PAGE_CACHE(page) != cachep) { + printk(KERN_ERR "mismatch in kmem_cache_free: expected cache %p, got %p\n", + GET_PAGE_CACHE(page),cachep); + printk(KERN_ERR "%p is %s.\n", cachep, cachep->name); + printk(KERN_ERR "%p is %s.\n", GET_PAGE_CACHE(page), GET_PAGE_CACHE(page)->name); + WARN_ON(1); + } slabp = GET_PAGE_SLAB(page); if (cachep->flags & SLAB_STORE_USER) {

--=_courier-11405-1058204587-0001-2--