Commit 3425d617 authored by Vlastimil Babka's avatar Vlastimil Babka Committed by Suren Baghdasaryan
Browse files

FROMLIST: mm: slub: fix slub_debug disabling for list of slabs

Vijayanand Jitta reports:

  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, which is wrong.

This patch fixes it by delaying the moment when the global slub_debug
flags variable is updated.  In case a "slub_debug=-,slab_name" has been
passed, the global flags remain as initialized (depending on
CONFIG_SLUB_DEBUG_ON enabled or disabled) and are not simply reset to 0.

Link: https://lkml.kernel.org/r/8a3d992a-473a-467b-28a0-4ad2ff60ab82@suse.cz


Signed-off-by: default avatarVlastimil Babka <vbabka@suse.cz>
Reported-by: default avatarVijayanand Jitta <vjitta@codeaurora.org>
Reviewed-by: default avatarVijayanand Jitta <vjitta@codeaurora.org>
Acked-by: default avatarDavid Rientjes <rientjes@google.com>
Cc: Christoph Lameter <cl@linux.com>
Cc: Pekka Enberg <penberg@kernel.org>
Cc: Joonsoo Kim <iamjoonsoo.kim@lge.com>
Cc: Vinayak Menon <vinmenon@codeaurora.org>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarMark Brown <broonie@kernel.org>

Bug: 195891241
Link: https://lore.kernel.org/lkml/8a3d992a-473a-467b-28a0-4ad2ff60ab82@suse.cz/



Change-Id: I1f94e8897181b230a7b2965b8943f1bdf20e0a49
Signed-off-by: default avatarVijayanand Jitta <vjitta@codeaurora.org>
parent 2e06e5e6
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment