From 0701a9e649bf0ffdac0a761d3c3d1041f5375d90 Mon Sep 17 00:00:00 2001 From: Yi Li Date: Fri, 25 Apr 2008 19:49:21 +0300 Subject: [PATCH] slob: fix bug - when slob allocates "struct kmem_cache", it does not force alignment. This may trigger misaligned memory access exception. Acked-by: Matt Mackall Signed-off-by: Yi Li Signed-off-by: Bryan Wu Signed-off-by: Pekka Enberg --- mm/slob.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mm/slob.c b/mm/slob.c index e2c3c0ec5463..6038cbadf796 100644 --- a/mm/slob.c +++ b/mm/slob.c @@ -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; -- 2.20.1