Commit dac10907 authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] slab: fix display of object length in corruption detector

From: Manfred Spraul <manfred@colorfullife.com>

print_objinfo() dumps the first few characters of an interesting object for
debugging.  It used the wrong object len (including debug padding, instead
of just the data area), which could cause an oops if DEBUG_PAGEALLOC is
enabled.
parent 5c5fbdbe
......@@ -914,7 +914,7 @@ static void print_objinfo(kmem_cache_t *cachep, void *objp, int lines)
printk("\n");
}
realobj = (char*)objp+obj_dbghead(cachep);
size = cachep->objsize;
size = obj_reallen(cachep);
for (i=0; i<size && lines;i+=16, lines--) {
int limit;
limit = 16;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment