* [PATCH] mm/slub.c: keep red_left_pad being zero without SLAB_RED_ZONE flag
@ 2019-01-04 10:09 Peng Wang
0 siblings, 0 replies; only message in thread
From: Peng Wang @ 2019-01-04 10:09 UTC (permalink / raw)
To: cl, penberg, rientjes, iamjoonsoo.kim, akpm
Cc: linux-mm, linux-kernel, Peng Wang
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@whu.edu.cn>
---
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
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2019-01-04 10:11 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-01-04 10:09 [PATCH] mm/slub.c: keep red_left_pad being zero without SLAB_RED_ZONE flag Peng Wang
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).