Re: [PATCH v1] mm/damon/reclaim: fix potential memory leak
From: SeongJae Park
Date: Sat Jun 20 2026 - 13:12:21 EST
On Sat, 20 Jun 2026 19:50:55 +0300 yahia <yahia.a.abdrabou@xxxxxxxxx> wrote:
> Hi SJ,
>
> Regarding you question in v1, This patch
> addresses a potential memory leak in the
> out path, ctx is never destroyed during exit
> thus creating a potential memory leak.
It is kept in the memory by the design. It will be destroyed when the user
enables DAMON_RECLAIM later. So, unfortunately I don't think this patch is
needed. Please correct me if I'm wrong.
Also, I'd recommend you to thoroughly read and follow the patch submission
guide [1], if you didn't have a chance to read it yet.
[1] https://docs.kernel.org/process/submitting-patches.html
Thanks,
SJ
[...]