Re: [BUG] mm/damon/core: dangling walk_control pointer in damos_walk() on inactive context

From: Greg KH

Date: Mon Feb 16 2026 - 10:54:04 EST


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