|
@@ -2353,6 +2353,15 @@ kmem_cache_create (const char *name, size_t size, size_t align,
|
|
|
/* really off slab. No need for manual alignment */
|
|
|
slab_size =
|
|
|
cachep->num * sizeof(kmem_bufctl_t) + sizeof(struct slab);
|
|
|
+
|
|
|
+#ifdef CONFIG_PAGE_POISONING
|
|
|
+ /* If we're going to use the generic kernel_map_pages()
|
|
|
+ * poisoning, then it's going to smash the contents of
|
|
|
+ * the redzone and userword anyhow, so switch them off.
|
|
|
+ */
|
|
|
+ if (size % PAGE_SIZE == 0 && flags & SLAB_POISON)
|
|
|
+ flags &= ~(SLAB_RED_ZONE | SLAB_STORE_USER);
|
|
|
+#endif
|
|
|
}
|
|
|
|
|
|
cachep->colour_off = cache_line_size();
|