Commit 0701a9e6 authored by Yi Li's avatar Yi Li Committed by Pekka Enberg

slob: fix bug - when slob allocates "struct kmem_cache", it does not force alignment.

This may trigger misaligned memory access exception.
Acked-by: default avatarMatt Mackall <mpm@selenic.com>
Signed-off-by: default avatarYi Li <yi.li@analog.com>
Signed-off-by: default avatarBryan Wu <cooloney@kernel.org>
Signed-off-by: default avatarPekka Enberg <penberg@cs.helsinki.fi>
parent b69d3987
......@@ -533,7 +533,8 @@ struct kmem_cache *kmem_cache_create(const char *name, size_t size,
{
struct kmem_cache *c;
c = slob_alloc(sizeof(struct kmem_cache), flags, 0, -1);
c = slob_alloc(sizeof(struct kmem_cache),
flags, ARCH_KMALLOC_MINALIGN, -1);
if (c) {
c->name = name;
......
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