* [PATCH] slub: Fix a crash during slabinfo -v
@ 2010-12-01 18:04 Tero Roponen
2010-12-01 18:11 ` Christoph Lameter
0 siblings, 1 reply; 2+ messages in thread
From: Tero Roponen @ 2010-12-01 18:04 UTC (permalink / raw)
To: linux-kernel; +Cc: David Rientjes, Christoph Lameter, Pekka Enberg
Commit f7cb1933621bce66a77f690776a16fe3ebbc4d58 ("SLUB: Pass active
and inactive redzone flags instead of boolean to debug functions")
missed two instances of check_object(). This caused a lot of warnings
during 'slabinfo -v' finally leading to a crash:
BUG ext4_xattr: Freepointer corrupt
...
BUG buffer_head: Freepointer corrupt
...
BUG ext4_alloc_context: Freepointer corrupt
...
...
BUG: unable to handle kernel NULL pointer dereference at 0000000000000008
IP: [<ffffffff810a291f>] file_sb_list_del+0x1c/0x35
PGD 79d78067 PUD 79e67067 PMD 0
Oops: 0002 [#1] SMP
last sysfs file: /sys/kernel/slab/:t-0000192/validate
This patch fixes the problem by converting the two missed instances.
Signed-off-by: Tero Roponen <tero.roponen@gmail.com>
diff --git a/mm/slub.c b/mm/slub.c
index 981fb73..bec0e35 100644
--- a/mm/slub.c
+++ b/mm/slub.c
@@ -3401,13 +3401,13 @@ static int validate_slab(struct kmem_cache *s, struct page *page,
for_each_free_object(p, s, page->freelist) {
set_bit(slab_index(p, s, addr), map);
- if (!check_object(s, page, p, 0))
+ if (!check_object(s, page, p, SLUB_RED_INACTIVE))
return 0;
}
for_each_object(p, s, addr, page->objects)
if (!test_bit(slab_index(p, s, addr), map))
- if (!check_object(s, page, p, 1))
+ if (!check_object(s, page, p, SLUB_RED_ACTIVE))
return 0;
return 1;
}
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] slub: Fix a crash during slabinfo -v
2010-12-01 18:04 [PATCH] slub: Fix a crash during slabinfo -v Tero Roponen
@ 2010-12-01 18:11 ` Christoph Lameter
0 siblings, 0 replies; 2+ messages in thread
From: Christoph Lameter @ 2010-12-01 18:11 UTC (permalink / raw)
To: Tero Roponen; +Cc: linux-kernel, David Rientjes, Pekka Enberg
On Wed, 1 Dec 2010, Tero Roponen wrote:
> This patch fixes the problem by converting the two missed instances.
Hmmm...A hunk was dropped somewhere.
Acked-by: Christoph Lameter <cl@linux.com>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-12-01 18:11 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-12-01 18:04 [PATCH] slub: Fix a crash during slabinfo -v Tero Roponen
2010-12-01 18:11 ` Christoph Lameter
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®