From: Pekka Enberg <penberg@kernel.org>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Dave Jones <davej@redhat.com>, Christoph Lameter <cl@linux.com>,
Markus Trippelsdorf <markus@trippelsdorf.de>,
Linux Kernel <linux-kernel@vger.kernel.org>,
Andrew Morton <akpm@linux-foundation.org>,
Jens Axboe <jaxboe@fusionio.com>
Subject: Re: list corruption in the last few days. (block ? crypto ?)
Date: Sun, 7 Aug 2011 21:58:16 +0300 (EEST) [thread overview]
Message-ID: <alpine.DEB.2.00.1108072155240.9480@tiger> (raw)
In-Reply-To: <CA+55aFwGSJM6g+YXfy_Oyb0OpQP5kH=OxCR-pnBk7RUshL+mXg@mail.gmail.com>
On Sat, 6 Aug 2011, Linus Torvalds wrote:
> Anybody has any ideas on this one? I'm back home, no more diving :(,
> ready to make -rc1, but I'd *prefer* to have a handle on this one.
>
> Of course, the fact that it apparently only happens with SLUB
> debugging on means that the impact is less, but on the other hand I
> really like all the people who enable debug features and help us test
> with those on. So..
Christoph, I've been reading the code and spotted two potential issues in
__slab_free(). The first one seems like an off-by-one where our comparison
in deactivate_slab() doesn't match __slab_free.
The other one is remove_full() call in __slab_free() that can get called
even if cache debugging is not enabled.
Hmm?
Pekka
diff --git a/mm/slub.c b/mm/slub.c
index eb5a8f9..cee8c20 100644
--- a/mm/slub.c
+++ b/mm/slub.c
@@ -2368,7 +2368,7 @@ static void __slab_free(struct kmem_cache *s, struct page *page,
if (was_frozen)
stat(s, FREE_FROZEN);
else {
- if (unlikely(!inuse && n->nr_partial > s->min_partial))
+ if (unlikely(!inuse && n->nr_partial >= s->min_partial))
goto slab_empty;
/*
@@ -2376,7 +2376,8 @@ static void __slab_free(struct kmem_cache *s, struct page *page,
* then add it.
*/
if (unlikely(!prior)) {
- remove_full(s, page);
+ if (kmem_cache_debug(s))
+ remove_full(s, page);
add_partial(n, page, 0);
stat(s, FREE_ADD_PARTIAL);
}
next prev parent reply other threads:[~2011-08-07 18:58 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-08-05 1:00 Dave Jones
2011-08-05 8:46 ` Markus Trippelsdorf
2011-08-05 9:13 ` Pekka Enberg
2011-08-05 9:22 ` Jens Axboe
2011-08-05 9:33 ` Pekka Enberg
2011-08-05 16:32 ` Christoph Lameter
2011-08-05 16:39 ` Dave Jones
2011-08-05 16:47 ` Christoph Lameter
2011-08-05 16:51 ` Dave Jones
2011-08-05 17:01 ` Christoph Lameter
2011-08-05 17:16 ` Dave Jones
2011-08-05 18:14 ` Christoph Lameter
2011-08-05 18:20 ` Dave Jones
2011-08-06 19:31 ` Linus Torvalds
2011-08-07 13:15 ` Pekka Enberg
2011-08-07 18:58 ` Pekka Enberg [this message]
2011-08-07 21:13 ` Linus Torvalds
2011-08-08 5:18 ` Pekka Enberg
2011-08-08 6:12 ` Linus Torvalds
2011-08-08 6:15 ` Xiaotian Feng
2011-08-08 6:14 ` Xiaotian Feng
2011-08-08 6:16 ` Pekka Enberg
2011-08-08 6:34 ` Xiaotian Feng
2011-08-08 6:18 ` Pekka Enberg
2011-08-08 6:31 ` Xiaotian Feng
2011-08-08 6:38 ` Pekka Enberg
2011-08-08 9:18 ` Xiaotian Feng
2011-08-08 14:58 ` Christoph Lameter
2011-08-07 20:36 ` Pekka Enberg
2011-08-05 9:00 ` Xiaotian Feng
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=alpine.DEB.2.00.1108072155240.9480@tiger \
--to=penberg@kernel.org \
--cc=akpm@linux-foundation.org \
--cc=cl@linux.com \
--cc=davej@redhat.com \
--cc=jaxboe@fusionio.com \
--cc=linux-kernel@vger.kernel.org \
--cc=markus@trippelsdorf.de \
--cc=torvalds@linux-foundation.org \
/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
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®