fix bug - when slob allocates "struct kmem_cache", it does not force alignment.
PATCH 1/1 fix bug - when slob allocates "struct kmem_cache", it does not force alignment.
From: Yi Li <[email protected]>
This may trigger misaligned memory access exception.
Signed-off-by Yi Li <[email protected]>
Signed-off-by Bryan Wu <[email protected]>
--- mm/slob.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-)
mm/slob.c +2 -1
@@ -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;
Signature · 1 line
1.5.5
Quoted 6 lines · Bryan Wu
From: Yi Li <[email protected]>
This may trigger misaligned memory access exception.
Signed-off-by Yi Li <[email protected]>Signed-off-by Bryan Wu <[email protected]>
Looks good, thanks. Christoph, do you want to take this or should it go through Andrew?
Acked-by Matt Mackall <[email protected]>
Quoted 18 lines
--- mm/slob.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-)mm/slob.c +2
-1@@ -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;
Signature · 1 line
Mathematics is the supreme nostalgia of our time.
Quoted 4 lines · Matt Mackall
Looks good, thanks. Christoph, do you want to take this or should it go through Andrew?
Acked-by Matt Mackall <[email protected]>
I'll pick it up in my tree which is "the" SLAB tree for now:
http://git.kernel.org/?p=linux/kernel/git/penberg/slab-2.6.git;a=summary
Thanks.
Pekka
Quoted 2 lines · Matt Mackall
Looks good, thanks. Christoph, do you want to take this or should it go through Andrew?
Pekka is handling the slab trees and it seems that he picked it up.