Commit 865d794d authored by Pekka Enberg's avatar Pekka Enberg

Merge branch 'slab/urgent' into slab/next

parents c9149556 3ff84a7f
...@@ -2289,8 +2289,8 @@ kmem_cache_create (const char *name, size_t size, size_t align, ...@@ -2289,8 +2289,8 @@ kmem_cache_create (const char *name, size_t size, size_t align,
if (ralign < align) { if (ralign < align) {
ralign = align; ralign = align;
} }
/* disable debug if not aligning with REDZONE_ALIGN */ /* disable debug if necessary */
if (ralign & (__alignof__(unsigned long long) - 1)) if (ralign > __alignof__(unsigned long long))
flags &= ~(SLAB_RED_ZONE | SLAB_STORE_USER); flags &= ~(SLAB_RED_ZONE | SLAB_STORE_USER);
/* /*
* 4) Store it. * 4) Store it.
...@@ -2316,8 +2316,8 @@ kmem_cache_create (const char *name, size_t size, size_t align, ...@@ -2316,8 +2316,8 @@ kmem_cache_create (const char *name, size_t size, size_t align,
*/ */
if (flags & SLAB_RED_ZONE) { if (flags & SLAB_RED_ZONE) {
/* add space for red zone words */ /* add space for red zone words */
cachep->obj_offset += align; cachep->obj_offset += sizeof(unsigned long long);
size += align + sizeof(unsigned long long); size += 2 * sizeof(unsigned long long);
} }
if (flags & SLAB_STORE_USER) { if (flags & SLAB_STORE_USER) {
/* user store requires one word storage behind the end of /* user store requires one word storage behind the end of
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment