RE: [BUG] mm/damon/core: dangling walk_control pointer in damos_walk() on inactive context
From: Raul Pazemecxas De Andrade
Date: Mon Feb 16 2026 - 11:27:55 EST
Thanks for your attention Greg and congratulations on your work on our Kernel
________________________________________
De: Greg KH <gregkh@xxxxxxxxxxxxxxxxxxx>
Enviadas: Segunda-feira, 16 de Fevereiro de 2026 12:52
Para: Raul Pazemecxas De Andrade <raul_pazemecxas@xxxxxxxxxxx>
Cc: sj@xxxxxxxxxx <sj@xxxxxxxxxx>; security@xxxxxxxxxx <security@xxxxxxxxxx>; damon@xxxxxxxxxxxxxxx <damon@xxxxxxxxxxxxxxx>; linux-mm@xxxxxxxxx <linux-mm@xxxxxxxxx>; linux-kernel@xxxxxxxxxxxxxxx <linux-kernel@xxxxxxxxxxxxxxx>
Assunto: Re: [BUG] mm/damon/core: dangling walk_control pointer in damos_walk() on inactive context
On Mon, Feb 16, 2026 at 03:34:44PM +0000, Raul Pazemecxas De Andrade wrote:
> Root cause
> ----------
>
> Commit bf0eaba0ff9c ("mm/damon/core: implement damos_walk()")
> introduced this function without cleanup on the -EINVAL error path.
>
> The sibling function damon_call() had the exact same bug and was
> fixed in f9132fbc2e83 by adding damon_call_handle_inactive_ctx()
> which removes the control object when the context is inactive.
> damos_walk() has no equivalent cleanup.
Can you submit a patch to resolve this to get credit for fixing the bug?
thanks,
greg k-h