Thread (7 messages) 7 messages, 3 authors, 2021-08-02

Re: [PATCH] mm: slub: Fix slub_debug disablement for list of slabs

From: David Rientjes <rientjes@google.com>
Date: 2021-08-02 03:26:09
Also in: lkml

On Tue, 27 Jul 2021, Vlastimil Babka wrote:
From 81a225fe31e53701902bb4caa9ab1524eb044cbc Mon Sep 17 00:00:00 2001
From: Vlastimil Babka <redacted>
Date: Tue, 13 Jul 2021 17:15:50 +0530
Subject: [PATCH] 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.

Reported-by: Vijayanand Jitta <redacted>
Signed-off-by: Vlastimil Babka <redacted>
Reviewed-by: Vijayanand Jitta <redacted>
Acked-by: David Rientjes <rientjes@google.com>

Looks better, thanks!
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help