The patch titled Subject: mm: slub: Fix slub_debug disablement for list of slabs has been added to the -mm tree. Its filename is mm-slub-fix-slub_debug-disablement-for-list-of-slabs.patch This patch should soon appear at https://ozlabs.org/~akpm/mmots/broken-out/mm-slub-fix-slub_debug-disablement-for-list-of-slabs.patch and later at https://ozlabs.org/~akpm/mmotm/broken-out/mm-slub-fix-slub_debug-disablement-for-list-of-slabs.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: Vijayanand Jitta <vjitta@xxxxxxxxxxxxxx> Subject: mm: slub: Fix slub_debug disablement for list of slabs Consider the scenario where CONFIG_SLUB_DEBUG_ON is set and we would want to disable slub_debug for few slabs. Using boot parameter with slub_debug=-,slab_name syntax doesn't work as expected i.e; only disabling debugging for the specified list of slabs, instead it disables debugging for all slabs. Fix this. Link: https://lkml.kernel.org/r/1626176750-13099-1-git-send-email-vjitta@xxxxxxxxxxxxxx Signed-off-by: Vijayanand Jitta <vjitta@xxxxxxxxxxxxxx> Cc: Christoph Lameter <cl@xxxxxxxxx> Cc: Pekka Enberg <penberg@xxxxxxxxxx> Cc: David Rientjes <rientjes@xxxxxxxxxx> Cc: Joonsoo Kim <iamjoonsoo.kim@xxxxxxx> Cc: Vlastimil Babka <vbabka@xxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- mm/slub.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) --- a/mm/slub.c~mm-slub-fix-slub_debug-disablement-for-list-of-slabs +++ a/mm/slub.c @@ -1415,6 +1415,7 @@ static int __init setup_slub_debug(char char *slab_list; bool global_slub_debug_changed = false; bool slab_list_specified = false; + bool slab_list_debug_disable = true; slub_debug = DEBUG_DEFAULT_FLAGS; if (*str++ != '=' || !*str) @@ -1422,7 +1423,6 @@ static int __init setup_slub_debug(char * No options specified. Switch on full debugging. */ goto out; - saved_str = str; while (str) { str = parse_slub_debug_flags(str, &flags, &slab_list, true); @@ -1431,6 +1431,8 @@ static int __init setup_slub_debug(char slub_debug = flags; global_slub_debug_changed = true; } else { + if (flags || !IS_ENABLED(CONFIG_SLUB_DEBUG_ON)) + slab_list_debug_disable = false; slab_list_specified = true; } } @@ -1442,7 +1444,7 @@ static int __init setup_slub_debug(char * long as there is no option specifying flags without a slab list. */ if (slab_list_specified) { - if (!global_slub_debug_changed) + if (!global_slub_debug_changed && !slab_list_debug_disable) slub_debug = 0; slub_debug_string = saved_str; } _ Patches currently in -mm which might be from vjitta@xxxxxxxxxxxxxx are mm-slub-fix-slub_debug-disablement-for-list-of-slabs.patch