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

From: Manfred Spraul (manfred@colorfullife.com)
Date: Mon Jul 14 2003 - 12:37:07 EST


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

--- 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) {

- 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/



This archive was generated by hypermail 2b29 : Tue Jul 15 2003 - 22:00:53 EST