diff options
author | Yi Li <yi.li@analog.com> | 2008-04-25 12:49:21 -0400 |
---|---|---|
committer | Pekka Enberg <penberg@cs.helsinki.fi> | 2008-04-27 11:25:51 -0400 |
commit | 0701a9e649bf0ffdac0a761d3c3d1041f5375d90 (patch) | |
tree | 1af2937107ca0ee1552523accac89c696125ba69 | |
parent | b69d3987f4360a5e7e9e55465b3cdd0cc204b79e (diff) |
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>
-rw-r--r-- | mm/slob.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -533,7 +533,8 @@ struct kmem_cache *kmem_cache_create(const char *name, size_t size, | |||
533 | { | 533 | { |
534 | struct kmem_cache *c; | 534 | struct kmem_cache *c; |
535 | 535 | ||
536 | c = slob_alloc(sizeof(struct kmem_cache), flags, 0, -1); | 536 | c = slob_alloc(sizeof(struct kmem_cache), |
537 | flags, ARCH_KMALLOC_MINALIGN, -1); | ||
537 | 538 | ||
538 | if (c) { | 539 | if (c) { |
539 | c->name = name; | 540 | c->name = name; |