linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Manfred Spraul <manfred@colorfullife.com>
To: Nicolas <linux@1g6.biz>
Cc: linux-kernel@vger.kernel.org
Subject: Re: 2.6.0-test1 oops mm/slab.c:1631
Date: Mon, 14 Jul 2003 19:37:07 +0200	[thread overview]
Message-ID: <3F12EA43.3030401@colorfullife.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 515 bytes --]

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

[-- Attachment #2: patch-slab-cachedebug --]
[-- Type: text/plain, Size: 625 bytes --]

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

             reply	other threads:[~2003-07-14 17:25 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-07-14 17:37 Manfred Spraul [this message]
  -- strict thread matches above, loose matches on Subject: below --
2003-07-14 16:44 Nicolas

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3F12EA43.3030401@colorfullife.com \
    --to=manfred@colorfullife.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@1g6.biz \
    --subject='Re: 2.6.0-test1 oops mm/slab.c:1631' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).