From: Vlastimil Babka <vbabka@suse.cz>
To: Eric Farman <farman@linux.ibm.com>
Cc: Christoph Lameter <cl@linux.com>,
Pekka Enberg <penberg@kernel.org>,
David Rientjes <rientjes@google.com>,
Joonsoo Kim <iamjoonsoo.kim@lge.com>,
Andrew Morton <akpm@linux-foundation.org>,
Kees Cook <keescook@chromium.org>,
linux-mm@kvack.org
Subject: Re: [PATCH 1/1] mm, slub: Restore initial kmem_cache flags
Date: Wed, 30 Sep 2020 13:37:06 +0200 [thread overview]
Message-ID: <ace3f143-a1ab-ea8b-21e7-8f4fa4e91fd7@suse.cz> (raw)
In-Reply-To: <20200930112612.76109-2-farman@linux.ibm.com>
On 9/30/20 1:26 PM, Eric Farman wrote:
> The routine that applies debug flags to the kmem_cache slabs
> inadvertantly prevents non-debug flags from being applied to
> those same objects. That is, if slub_debug=<flag>,<slab> is
> specified, non-debugged slabs will end up having flags of zero,
> and the slabs will be unusable. Fix this by returning the input
> flags for non-matching slabs as was done previously.
Thanks a lot for debugging this and sorry for the trouble!
> Fixes: e17f1dfba37b ("mm, slub: extend slub_debug syntax for multiple blocks")
> Signed-off-by: Eric Farman <farman@linux.ibm.com>
Acked-by: Vlastimil Babka <vbabka@suse.cz>
But with a small adjustment below:
> ---
> mm/slub.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/mm/slub.c b/mm/slub.c
> index d4177aecedf6..3d7c95fd6a08 100644
> --- a/mm/slub.c
> +++ b/mm/slub.c
> @@ -1450,7 +1450,7 @@ slab_flags_t kmem_cache_flags(unsigned int object_size,
> }
> }
>
> - return slub_debug;
> + return flags;
To keep supporting the case of "debug flags set for all caches, with exceptions
for listed caches", i.e. "slub_debug=FZ;-,zs_handle,zspage", we should return
here this:
return flags | slub_debug;
Thanks again!
> }
> #else /* !CONFIG_SLUB_DEBUG */
> static inline void setup_object_debug(struct kmem_cache *s,
>
next prev parent reply other threads:[~2020-09-30 11:37 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-30 11:26 [PATCH 0/1] Fix slub_debug on 5.9-rc Eric Farman
2020-09-30 11:26 ` [PATCH 1/1] mm, slub: Restore initial kmem_cache flags Eric Farman
2020-09-30 11:37 ` Vlastimil Babka [this message]
2020-09-30 13:06 ` Eric Farman
2020-09-30 13:54 ` Vlastimil Babka
2020-09-30 16:19 ` [PATCH v2] " Eric Farman
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=ace3f143-a1ab-ea8b-21e7-8f4fa4e91fd7@suse.cz \
--to=vbabka@suse.cz \
--cc=akpm@linux-foundation.org \
--cc=cl@linux.com \
--cc=farman@linux.ibm.com \
--cc=iamjoonsoo.kim@lge.com \
--cc=keescook@chromium.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