From: Yi Li Date: Fri, 25 Apr 2008 16:49:21 +0000 (+0300) Subject: slob: fix bug - when slob allocates "struct kmem_cache", it does not force alignment. X-Git-Tag: v2.6.26-rc1~695^2~14 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=0701a9e649bf0ffdac0a761d3c3d1041f5375d90;p=linux-2.6-omap-h63xx.git 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 --- diff --git a/mm/slob.c b/mm/slob.c index e2c3c0ec546..6038cbadf79 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;