diff options
Diffstat (limited to 'mm/slab.c')
-rw-r--r-- | mm/slab.c | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -2308,6 +2308,15 @@ kmem_cache_create (const char *name, size_t size, size_t align, | |||
2308 | /* really off slab. No need for manual alignment */ | 2308 | /* really off slab. No need for manual alignment */ |
2309 | slab_size = | 2309 | slab_size = |
2310 | cachep->num * sizeof(kmem_bufctl_t) + sizeof(struct slab); | 2310 | cachep->num * sizeof(kmem_bufctl_t) + sizeof(struct slab); |
2311 | |||
2312 | #ifdef CONFIG_PAGE_POISONING | ||
2313 | /* If we're going to use the generic kernel_map_pages() | ||
2314 | * poisoning, then it's going to smash the contents of | ||
2315 | * the redzone and userword anyhow, so switch them off. | ||
2316 | */ | ||
2317 | if (size % PAGE_SIZE == 0 && flags & SLAB_POISON) | ||
2318 | flags &= ~(SLAB_RED_ZONE | SLAB_STORE_USER); | ||
2319 | #endif | ||
2311 | } | 2320 | } |
2312 | 2321 | ||
2313 | cachep->colour_off = cache_line_size(); | 2322 | cachep->colour_off = cache_line_size(); |