linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] tools/mm/slabinfo: Fix trace disabling logic
@ 2025-12-08  8:42 Kaushlendra Kumar
  2025-12-08  9:29 ` Harry Yoo
  0 siblings, 1 reply; 3+ messages in thread
From: Kaushlendra Kumar @ 2025-12-08  8:42 UTC (permalink / raw)
  To: akpm; +Cc: linux-mm, Kaushlendra Kumar

When tracing is disabled (!tracing) but the slab has tracing enabled
(s->trace), the code should disable tracing by writing 0, not enable
it by writing 1. Fix the inverted logic to correctly turn off tracing.

Signed-off-by: Kaushlendra Kumar <kaushlendra.kumar@intel.com>
---
 tools/mm/slabinfo.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/mm/slabinfo.c b/tools/mm/slabinfo.c
index 80cdbd3db82d..7c51d283504d 100644
--- a/tools/mm/slabinfo.c
+++ b/tools/mm/slabinfo.c
@@ -798,7 +798,7 @@ static void slab_debug(struct slabinfo *s)
 			fprintf(stderr, "%s can only enable trace for one slab at a time\n", s->name);
 	}
 	if (!tracing && s->trace)
-		set_obj(s, "trace", 1);
+		set_obj(s, "trace", 0);
 }
 
 static void totals(void)
-- 
2.34.1



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2025-12-08 12:26 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-12-08  8:42 [PATCH] tools/mm/slabinfo: Fix trace disabling logic Kaushlendra Kumar
2025-12-08  9:29 ` Harry Yoo
2025-12-08 12:25   ` Kumar, Kaushlendra

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox