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

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

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
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -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;