aboutsummaryrefslogtreecommitdiffstats
path: root/mm/slab.c
diff options
context:
space:
mode:
Diffstat (limited to 'mm/slab.c')
-rw-r--r--mm/slab.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/mm/slab.c b/mm/slab.c
index 37961d1f584f..4c6e2e31ced0 100644
--- a/mm/slab.c
+++ b/mm/slab.c
@@ -2288,8 +2288,8 @@ kmem_cache_create (const char *name, size_t size, size_t align,
2288 if (ralign < align) { 2288 if (ralign < align) {
2289 ralign = align; 2289 ralign = align;
2290 } 2290 }
2291 /* disable debug if not aligning with REDZONE_ALIGN */ 2291 /* disable debug if necessary */
2292 if (ralign & (__alignof__(unsigned long long) - 1)) 2292 if (ralign > __alignof__(unsigned long long))
2293 flags &= ~(SLAB_RED_ZONE | SLAB_STORE_USER); 2293 flags &= ~(SLAB_RED_ZONE | SLAB_STORE_USER);
2294 /* 2294 /*
2295 * 4) Store it. 2295 * 4) Store it.
@@ -2315,8 +2315,8 @@ kmem_cache_create (const char *name, size_t size, size_t align,
2315 */ 2315 */
2316 if (flags & SLAB_RED_ZONE) { 2316 if (flags & SLAB_RED_ZONE) {
2317 /* add space for red zone words */ 2317 /* add space for red zone words */
2318 cachep->obj_offset += align; 2318 cachep->obj_offset += sizeof(unsigned long long);
2319 size += align + sizeof(unsigned long long); 2319 size += 2 * sizeof(unsigned long long);
2320 } 2320 }
2321 if (flags & SLAB_STORE_USER) { 2321 if (flags & SLAB_STORE_USER) {
2322 /* user store requires one word storage behind the end of 2322 /* user store requires one word storage behind the end of