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 --- 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