Re: [RFC PATCH v4 0/6] samples/damon: handle damon_{start,stop}() failures
From: SeongJae Park
Date: Wed Jun 10 2026 - 20:07:47 EST
On Wed, 10 Jun 2026 06:55:38 -0700 SeongJae Park <sj@xxxxxxxxxx> wrote:
> All DAMON sample modules are not correctly handling failures from
> damon_start(). Among those, mtier also has an additional problem for
> handling of damon_stop() failures. wsse and prcl also have a problem in
> their damon_call() failure handling. As a result, memory leaks, next
> DAMON operation disruptions, and use-after-free can happen. Fix those.
>
> Note that only the damon_start() failure caused issues can reliably be
> reproduced. Reproducing those issues require the admin permission,
> though.
Finally this series passed the Sashiko review [1]. I initially aimed to drop
RFC of this patch series as soon as passing Sashiko review. But, the size of
this series has been 3x compared to the initial one, because Sashiko was
finding more pre-existing issues for every review round, and I added fixes for
those in this series.
Due to the size and short remaining time until the next merge window, I'm now
hesitatng.i The last three fixes might not deserve to rush, because they are
relatively difficult to intentionally be reproduced. The first three fixes
might be better to be merged as soon as possible, since the issues can reliably
and repetitively triggered. But, still those are sample modules, and the bug
was introduced with 6.14, which was released in Mar 2025.
So I think it is better to give Andrew and Linus more time for the merge
window. I will hold dropping RFC tag of this series until it seems Andrew
finished the next merge window works. Let me know if any of you have different
opinions, though!
[1] https://sashiko.dev/#/patchset/20260610135546.64943-1-sj%40kernel.org
Thanks,
SJ
[...]