From: SeongJae Park <sj@kernel.org>
To: Jackie Liu <liu.yun@linux.dev>
Cc: SeongJae Park <sj@kernel.org>,
akpm@linux-foundation.org, linux-mm@kvack.org,
damon@lists.linux.dev, stable@vger.kernel.org
Subject: Re: [PATCH] mm/damon/stat: fix memory leak on damon_start() failure in damon_stat_start()
Date: Tue, 31 Mar 2026 18:32:49 -0700 [thread overview]
Message-ID: <20260401013250.90153-1-sj@kernel.org> (raw)
In-Reply-To: <20260331101553.88422-1-liu.yun@linux.dev>
+ damon@lists.linux.dev. Please Cc damon@ for all DAMON patches.
Hello Jackie,
On Tue, 31 Mar 2026 18:15:53 +0800 Jackie Liu <liu.yun@linux.dev> wrote:
> From: Jackie Liu <liuyun01@kylinos.cn>
>
> Destroy the DAMON context and reset the global pointer when
> damon_start() fails. Otherwise, the context allocated by
> damon_stat_build_ctx() is leaked, and the stale damon_stat_context
> pointer will be overwritten on the next enable attempt, making the
> old allocation permanently unreachable.
>
> Fixes: 369c415e6073 ("mm/damon: introduce DAMON_STAT module")
As this is a memory leak, let's add Cc: stable@ too.
Cc: <stable@vger.kernel.org> # 6.17.x
> Signed-off-by: Jackie Liu <liuyun01@kylinos.cn>
Reviewed-by: SeongJae Park <sj@kernel.org>
Thanks,
SJ
[...]
prev parent reply other threads:[~2026-04-01 1:32 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-31 10:15 [PATCH] mm/damon/stat: fix memory leak on damon_start() failure in damon_stat_start() Jackie Liu
2026-04-01 1:24 ` (sashiko review) " SeongJae Park
2026-04-01 1:32 ` SeongJae Park [this message]
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=20260401013250.90153-1-sj@kernel.org \
--to=sj@kernel.org \
--cc=akpm@linux-foundation.org \
--cc=damon@lists.linux.dev \
--cc=linux-mm@kvack.org \
--cc=liu.yun@linux.dev \
--cc=stable@vger.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox