Re: [PATCH v1 1/3] tools/mm/slabinfo: Fix trace disable logic inversion

From: SeongJae Park

Date: Fri May 15 2026 - 19:58:32 EST


Hello wangxuewen,

On Fri, 15 May 2026 14:53:23 +0800 wangxuewen <18810879172@xxxxxxx> wrote:

> The disable trace path in slab_debug() had a logic error where it would
> set trace=1 instead of trace=0. This made trace functionality permanently
> enabled once turned on for any slab cache.

Nice catch.

>
> Signed-off-by: wangxuewen <wangxuewen@xxxxxxxxxx>

checkpatch.pl gives below warning. I think that should be fixed:

WARNING: From:/Signed-off-by: email address mismatch: 'From: wangxuewen <18810879172@xxxxxxx>' != 'Signed-off-by: wangxuewen <wangxuewen@xxxxxxxxxx>'

Also, should we add Fixes: and Cc: stable@ to this patch?

Assuming the email address mismatch will be fixed (my second question is not a
blocking question),

Reviewed-by: SeongJae Park <sj@xxxxxxxxxx>


> ---
> 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 54c7265ab52d..39f7eae7eecd 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);
> }

I think it might make sense to use 'tracing' as the third argument. Just a
loud thought of my personal taste. I don't think that's what this patch should
do.


Thanks,
SJ

[...]