[PATCH] mm/slub.c: keep red_left_pad being zero without SLAB_RED_ZONE flag

From: Peng Wang
Date: Fri Jan 04 2019 - 05:11:06 EST


It seems more clear for red_left_pad to be zero despite not being used
without SLAB_RED_ZONE flag.

Signed-off-by: Peng Wang <rocking@xxxxxxxxxx>
---
mm/slub.c | 1 +
1 file changed, 1 insertion(+)

diff --git a/mm/slub.c b/mm/slub.c
index 36c0befeebd8..9d16ca30bc2a 100644
--- a/mm/slub.c
+++ b/mm/slub.c
@@ -3603,6 +3603,7 @@ static int kmem_cache_open(struct kmem_cache *s, slab_flags_t flags)
if (get_order(s->size) > get_order(s->object_size)) {
s->flags &= ~DEBUG_METADATA_FLAGS;
s->offset = 0;
+ s->red_left_pad = 0;
if (!calculate_sizes(s, -1))
goto error;
}
--
2.19.1