From: Christoph Lameter The object size calculation is wrong if !CONFIG_SLUB_DEBUG because the #ifdef CONFIG_SLUB_DEBUG is now switching off the size adjustments for DESTROY_BY_RCU and ctor. Signed-off-by: Christoph Lameter Acked-by: Hugh Dickins Signed-off-by: Andrew Morton --- mm/slub.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff -puN mm/slub.c~slub-debug-fix-object-size-calculation mm/slub.c --- a/mm/slub.c~slub-debug-fix-object-size-calculation +++ a/mm/slub.c @@ -1917,7 +1917,6 @@ static int calculate_sizes(struct kmem_c */ s->inuse = size; -#ifdef CONFIG_SLUB_DEBUG if (((flags & (SLAB_DESTROY_BY_RCU | SLAB_POISON)) || s->ctor)) { /* @@ -1932,6 +1931,7 @@ static int calculate_sizes(struct kmem_c size += sizeof(void *); } +#ifdef CONFIG_SLUB_DEBUG if (flags & SLAB_STORE_USER) /* * Need to store information about allocs and frees after _