]> git.baikalelectronics.ru Git - kernel.git/commit
mm, slab: initialize object alignment on cache creation
authorDavid Rientjes <rientjes@google.com>
Thu, 25 Sep 2014 23:05:20 +0000 (16:05 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 26 Sep 2014 15:10:35 +0000 (08:10 -0700)
commit6a8ef59918d4649d49cc63acddeb3c3f0cf36704
treeee03eb6ccce084507f013104e2ccf75b0138f0b4
parentc1e7b73d0d6cb59fb3465af16417f6650971b258
mm, slab: initialize object alignment on cache creation

Since commit e0b4d86a3293 ("mm/sl[aou]b: Common alignment code"), the
"ralign" automatic variable in __kmem_cache_create() may be used as
uninitialized.

The proper alignment defaults to BYTES_PER_WORD and can be overridden by
SLAB_RED_ZONE or the alignment specified by the caller.

This fixes https://bugzilla.kernel.org/show_bug.cgi?id=85031

Signed-off-by: David Rientjes <rientjes@google.com>
Reported-by: Andrei Elovikov <a.elovikov@gmail.com>
Acked-by: Christoph Lameter <cl@linux.com>
Cc: Pekka Enberg <penberg@kernel.org>
Cc: Joonsoo Kim <iamjoonsoo.kim@lge.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
mm/slab.c