linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Peng Wang <rocking@whu.edu.cn>
To: cl@linux.com, penberg@kernel.org, rientjes@google.com,
	iamjoonsoo.kim@lge.com, akpm@linux-foundation.org
Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org,
	Peng Wang <rocking@whu.edu.cn>
Subject: [PATCH] mm/slub.c: keep red_left_pad being zero without SLAB_RED_ZONE flag
Date: Fri,  4 Jan 2019 18:09:41 +0800	[thread overview]
Message-ID: <20190104100941.29872-1-rocking@whu.edu.cn> (raw)

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

                 reply	other threads:[~2019-01-04 10:09 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190104100941.29872-1-rocking@whu.edu.cn \
    --to=rocking@whu.edu.cn \
    --cc=akpm@linux-foundation.org \
    --cc=cl@linux.com \
    --cc=iamjoonsoo.kim@lge.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=penberg@kernel.org \
    --cc=rientjes@google.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox