Messages in this thread Patch in this message | | | Date | Mon, 14 Jul 2003 19:37:07 +0200 | From | Manfred Spraul <> | Subject | Re: 2.6.0-test1 oops mm/slab.c:1631 |
| |
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) { | |