All of lore.kernel.org
 help / color / mirror / Atom feed
From: SJ Park <sj@kernel.org>
To: Hongfu Li <lihongfu@kylinos.cn>
Cc: SJ Park <sj@kernel.org>,
	jgg@ziepe.ca, leon@kernel.org, akpm@linux-foundation.org,
	david@kernel.org, ljs@kernel.org, liam@infradead.org,
	vbabka@kernel.org, rppt@kernel.org, surenb@google.com,
	mhocko@suse.com, shuah@kernel.org, linux-mm@kvack.org,
	linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org,
	hongfu.li@linux.dev
Subject: Re: [PATCH] selftests/mm: Fix memleak in migration benchmark
Date: Wed,  8 Jul 2026 18:09:05 -0700	[thread overview]
Message-ID: <20260709010905.128451-1-sj@kernel.org> (raw)
In-Reply-To: <20260708103705.840679-1-lihongfu@kylinos.cn>

On Wed,  8 Jul 2026 18:37:05 +0800 Hongfu Li <lihongfu@kylinos.cn> wrote:

> Several early return paths in run_migration_benchmark() skip
> hmm_buffer_free(), leaking the buffer. Replace with a single cleanup
> label.

Looks good to me.

> 
> Signed-off-by: Hongfu Li <lihongfu@kylinos.cn>

As David suggested, having Fixes: would be nice.  Seems 271a7b2e3c13
("selftests/mm/hmm-tests: new throughput tests including THP") could be the
one?

Reviewed-by: SJ Park <sj@kernel.org>

[...]
>  
>  	/* Cleanup */
> +cleanup:
>  	hmm_buffer_free(buffer);
> -	return 0;
> +	return ret;

A trivial nit.  I think '/* Cleanup */' doesn't really need to be stayed there,
as the 'cleanup:' label self-explains what it is doing here.


Thanks,
SJ

[...]

  parent reply	other threads:[~2026-07-09  1:09 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-08 10:37 [PATCH] selftests/mm: Fix memleak in migration benchmark Hongfu Li
2026-07-08 13:15 ` David Hildenbrand (Arm)
2026-07-09  1:54   ` Hongfu Li
2026-07-09  1:09 ` SJ Park [this message]
2026-07-09  2:02   ` Hongfu Li
2026-07-09  2:37 ` Andrew Morton
2026-07-09  3:03   ` Hongfu Li
2026-07-11  7:31 ` Lorenzo Stoakes
2026-07-13  8:07   ` Hongfu Li
2026-07-13  9:38     ` David Hildenbrand (Arm)

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260709010905.128451-1-sj@kernel.org \
    --to=sj@kernel.org \
    --cc=akpm@linux-foundation.org \
    --cc=david@kernel.org \
    --cc=hongfu.li@linux.dev \
    --cc=jgg@ziepe.ca \
    --cc=leon@kernel.org \
    --cc=liam@infradead.org \
    --cc=lihongfu@kylinos.cn \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=ljs@kernel.org \
    --cc=mhocko@suse.com \
    --cc=rppt@kernel.org \
    --cc=shuah@kernel.org \
    --cc=surenb@google.com \
    --cc=vbabka@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.