* + mm-slub-restore-initial-kmem_cache-flags.patch added to -mm tree
@ 2020-09-30 21:46 akpm
0 siblings, 0 replies; only message in thread
From: akpm @ 2020-09-30 21:46 UTC (permalink / raw)
To: cl, farman, iamjoonsoo.kim, keescook, mm-commits, penberg,
rientjes, vbabka
The patch titled
Subject: mm, slub: restore initial kmem_cache flags
has been added to the -mm tree. Its filename is
mm-slub-restore-initial-kmem_cache-flags.patch
This patch should soon appear at
https://ozlabs.org/~akpm/mmots/broken-out/mm-slub-restore-initial-kmem_cache-flags.patch
and later at
https://ozlabs.org/~akpm/mmotm/broken-out/mm-slub-restore-initial-kmem_cache-flags.patch
Before you just go and hit "reply", please:
a) Consider who else should be cc'ed
b) Prefer to cc a suitable mailing list as well
c) Ideally: find the original patch on the mailing list and do a
reply-to-all to that, adding suitable additional cc's
*** Remember to use Documentation/process/submit-checklist.rst when testing your code ***
The -mm tree is included into linux-next and is updated
there every 3-4 working days
------------------------------------------------------
From: Eric Farman <farman@linux.ibm.com>
Subject: mm, slub: restore initial kmem_cache flags
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 may be unusable.
Fix this by including the input flags for non-matching slabs with the
contents of slub_debug, so that the caches are created as expected
alongside any debugging options that may be requested. With this, we can
remove the check for a NULL slub_debug_string, since it's covered by the
loop itself.
Link: https://lkml.kernel.org/r/20200930161931.28575-1-farman@linux.ibm.com
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>
Cc: Kees Cook <keescook@chromium.org>
Cc: Christoph Lameter <cl@linux.com>
Cc: Pekka Enberg <penberg@kernel.org>
Cc: David Rientjes <rientjes@google.com>
Cc: Joonsoo Kim <iamjoonsoo.kim@lge.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
mm/slub.c | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
--- a/mm/slub.c~mm-slub-restore-initial-kmem_cache-flags
+++ a/mm/slub.c
@@ -1413,10 +1413,6 @@ slab_flags_t kmem_cache_flags(unsigned i
char *next_block;
slab_flags_t block_flags;
- /* If slub_debug = 0, it folds into the if conditional. */
- if (!slub_debug_string)
- return flags | slub_debug;
-
len = strlen(name);
next_block = slub_debug_string;
/* Go through all blocks of debug options, see if any matches our slab's name */
@@ -1450,7 +1446,7 @@ slab_flags_t kmem_cache_flags(unsigned i
}
}
- return slub_debug;
+ return flags | slub_debug;
}
#else /* !CONFIG_SLUB_DEBUG */
static inline void setup_object_debug(struct kmem_cache *s,
_
Patches currently in -mm which might be from farman@linux.ibm.com are
mm-slub-restore-initial-kmem_cache-flags.patch
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2020-09-30 21:46 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-30 21:46 + mm-slub-restore-initial-kmem_cache-flags.patch added to -mm tree akpm
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.