Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c12b3c62 authored by Christoph Lameter's avatar Christoph Lameter Committed by Linus Torvalds
Browse files

SLUB Debug: Fix object size calculation



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: default avatarChristoph Lameter <clameter@sgi.com>
Acked-by: default avatarHugh Dickins <hugh@veritas.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 72fcde96
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1917,7 +1917,6 @@ static int calculate_sizes(struct kmem_cache *s)
	 */
	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_cache *s)
		size += sizeof(void *);
	}

#ifdef CONFIG_SLUB_DEBUG
	if (flags & SLAB_STORE_USER)
		/*
		 * Need to store information about allocs and frees after