summaryrefslogtreecommitdiffstats
path: root/mm/slob.c
diff options
context:
space:
mode:
authorYi Li <yi.li@analog.com>2008-04-25 18:49:21 +0200
committerPekka Enberg <penberg@cs.helsinki.fi>2008-04-27 17:25:51 +0200
commit0701a9e649bf0ffdac0a761d3c3d1041f5375d90 (patch)
tree1af2937107ca0ee1552523accac89c696125ba69 /mm/slob.c
parentMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/x86... (diff)
downloadlinux-0701a9e649bf0ffdac0a761d3c3d1041f5375d90.tar.xz
linux-0701a9e649bf0ffdac0a761d3c3d1041f5375d90.zip
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 <mpm@selenic.com> Signed-off-by: Yi Li <yi.li@analog.com> Signed-off-by: Bryan Wu <cooloney@kernel.org> Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Diffstat (limited to 'mm/slob.c')
-rw-r--r--mm/slob.c3
1 files changed, 2 insertions, 1 deletions
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;