The Linux Kernel Mailing List
 help / color / mirror / Atom feed
* [PATCH 0/6] samples/damon: handle damon_{start,stop}() failures
@ 2026-06-28 21:54 SJ Park
  2026-06-28 21:54 ` [PATCH 1/6] samples/damon/wsse: handle damon_start() failure SJ Park
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: SJ Park @ 2026-06-28 21:54 UTC (permalink / raw)
  To: Andrew Morton; +Cc: SJ Park, # 6 . 14 . x, damon, linux-kernel, linux-mm

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.

Changes from RFC v4
- RFC v4: https://lore.kernel.org/20260610135546.64943-1-sj@kernel.org/
- Collect R-b: from Zenghui Yu.
- Rebase to latest mm-new.
- Drop RFC.
Changes from RFC v3
- RFC v3: https://lore.kernel.org/20260610011420.3018-1-sj@kernel.org
- Add damon_Call() failure handling fixes for wsse and prcl.
Changes from RFC v2
- RFC v2: https://lore.kernel.org/20260609142119.68120-1-sj@kernel.org
- Add damon_start() failure handling fixes for wsse and prcl.
Changes from RFC v1
- RFC v1: https://lore.kernel.org/20260609005443.2122-1-sj@kernel.org
- Add damon_stop() failure handling fix to the series.

SJ Park (6):
  samples/damon/wsse: handle damon_start() failure
  samples/damon/prcl: handle damon_start() failure
  samples/damon/mtier: handle damon_start() failure
  samples/damon/mtier: handle damon_stop() failure
  samples/damon/wsse: stop and free damon ctx when damon_call() fails
  samples/damon/prcl: stop and free damon ctx when damon_call() fails

 samples/damon/mtier.c | 14 ++++++++++++--
 samples/damon/prcl.c  | 11 +++++++++--
 samples/damon/wsse.c  | 11 +++++++++--
 3 files changed, 30 insertions(+), 6 deletions(-)


base-commit: 77fe35dfe005f7d55c8e729e1543b87cfc805a21
-- 
2.47.3

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2026-06-28 21:54 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-06-28 21:54 [PATCH 0/6] samples/damon: handle damon_{start,stop}() failures SJ Park
2026-06-28 21:54 ` [PATCH 1/6] samples/damon/wsse: handle damon_start() failure SJ Park
2026-06-28 21:54 ` [PATCH 2/6] samples/damon/prcl: " SJ Park
2026-06-28 21:54 ` [PATCH 3/6] samples/damon/mtier: " SJ Park
2026-06-28 21:54 ` [PATCH 4/6] samples/damon/mtier: handle damon_stop() failure SJ Park
2026-06-28 21:54 ` [PATCH 5/6] samples/damon/wsse: stop and free damon ctx when damon_call() fails SJ Park
2026-06-28 21:54 ` [PATCH 6/6] samples/damon/prcl: " SJ Park

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox