Re: [PATCH] slub: dump more data on slab corruption

Previous thread: 2.6.24.7: PCMCIA usb card failure causes panic at fs/buffer.c:1169 mark_buffer_dirty() by Martin MOKREJŠ on Friday, July 18, 2008 - 9:37 am. (1 message)

Next thread: [Patch] vdso: check the value of vdso_enabled by WANG Cong on Friday, July 18, 2008 - 10:40 am. (1 message)
To: <linux-kernel@...>
Cc: <mingo@...>, <cl@...>
Date: Friday, July 18, 2008 - 10:29 am

From: Pekka Enberg <penberg@cs.helsinki.fi>

The limit to 128 bytes is too small when debugging slab corruption of the skb
cache, for example. Increase the limit to PAGE_SIZE to make debugging
corruptions sligthly easier.

Cc: Ingo Molnar <mingo@elte.hu>
Cc: Christoph Lameter <cl@linux-foundation.org>
Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
---
mm/slub.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

Index: linux-2.6/mm/slub.c
===================================================================
--- linux-2.6.orig/mm/slub.c 2008-07-18 17:26:01.000000000 +0300
+++ linux-2.6/mm/slub.c 2008-07-18 17:26:09.000000000 +0300
@@ -492,7 +492,7 @@
if (p > addr + 16)
print_section("Bytes b4", p - 16, 16);

- print_section("Object", p, min(s->objsize, 128));
+ print_section("Object", p, min_t(unsigned long, s->objsize, PAGE_SIZE));

if (s->flags & SLAB_RED_ZONE)
print_section("Redzone", p + s->objsize,
--

To: Pekka J Enberg <penberg@...>
Cc: <linux-kernel@...>, <cl@...>
Date: Friday, July 18, 2008 - 4:26 pm

Acked-by: Ingo Molnar <mingo@elte.hu>

Ingo
--

To: Ingo Molnar <mingo@...>
Cc: <linux-kernel@...>, <cl@...>
Date: Saturday, July 19, 2008 - 7:20 am

Applied, thanks!

--

To: Pekka J Enberg <penberg@...>
Cc: <linux-kernel@...>, <mingo@...>
Date: Friday, July 18, 2008 - 10:32 am

Acked-by: Christoph Lameter <cl@linux-foundation.org>
--

Previous thread: 2.6.24.7: PCMCIA usb card failure causes panic at fs/buffer.c:1169 mark_buffer_dirty() by Martin MOKREJŠ on Friday, July 18, 2008 - 9:37 am. (1 message)

Next thread: [Patch] vdso: check the value of vdso_enabled by WANG Cong on Friday, July 18, 2008 - 10:40 am. (1 message)