aboutsummaryrefslogtreecommitdiffstats
path: root/mm/slab.c
diff options
context:
space:
mode:
Diffstat (limited to 'mm/slab.c')
-rw-r--r--mm/slab.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/mm/slab.c b/mm/slab.c
index 9a90b00d2f91..1a6040d0f41d 100644
--- a/mm/slab.c
+++ b/mm/slab.c
@@ -2353,6 +2353,15 @@ kmem_cache_create (const char *name, size_t size, size_t align,
2353 /* really off slab. No need for manual alignment */ 2353 /* really off slab. No need for manual alignment */
2354 slab_size = 2354 slab_size =
2355 cachep->num * sizeof(kmem_bufctl_t) + sizeof(struct slab); 2355 cachep->num * sizeof(kmem_bufctl_t) + sizeof(struct slab);
2356
2357#ifdef CONFIG_PAGE_POISONING
2358 /* If we're going to use the generic kernel_map_pages()
2359 * poisoning, then it's going to smash the contents of
2360 * the redzone and userword anyhow, so switch them off.
2361 */
2362 if (size % PAGE_SIZE == 0 && flags & SLAB_POISON)
2363 flags &= ~(SLAB_RED_ZONE | SLAB_STORE_USER);
2364#endif
2356 } 2365 }
2357 2366
2358 cachep->colour_off = cache_line_size(); 2367 cachep->colour_off = cache_line_size();