Skip to content

RFC mm/damon: unurgent fixes for infinite loop, NULL de-ref and races

SJ Park damon linux-kselftest linux-mm lkml stable 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest5 patches 1 replyIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/5mm/damon/core: avoid infinite kdamond_merge_regions() internal loopmm/damon/core.c+9 -40 replies
2/5mm/damon/tests/core-kunit: catch test failure in test_merge_regions_of()mm/damon/tests/core-kunit.h+3 -00 replies
3/5mm/damon/vaddr: drop last same folio access check optimizationmm/damon/vaddr.c+4 -221 reply
4/5mm/damon/paddr: drop last same folio access check reuse optimizationmm/damon/paddr.c+4 -160 replies
5/5mm/damon/sysfs: read ops_id only oncemm/damon/sysfs.c+4 -20 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [RFC PATCH v1.1 0/5] mm/damon: unurgent fixes for infinite loop, NULL de-ref and races

Sashiko found a few issues in DAMON that could cause infinite loop, NULL dereference and monitoring results degradation. The first two sounds scary but the infinite loop happens only under unreasonable user setup. The NULL dereference is only in a unit test. Monitoring results degradation is trivial since it is only best-effort, and those happens from only unlikely races. Still those are bugs that better to fix if possible. Fix those.

Changes from RFC
- RFC: https://lore.kernel.org/[email protected]
- Rebase to mm-new.

SJ Park (5):
mm/damon/core: avoid infinite kdamond_merge_regions() internal loop mm/damon/tests/core-kunit: catch test failure in
test_merge_regions_of()
mm/damon/vaddr: drop last same folio access check optimization mm/damon/paddr: drop last same folio access check reuse optimization mm/damon/sysfs: read ops_id only once

 mm/damon/core.c             | 13 +++++++++----
 mm/damon/paddr.c            | 20 ++++----------------
 mm/damon/sysfs.c            |  6 ++++--
 mm/damon/tests/core-kunit.h |  3 +++
 mm/damon/vaddr.c            | 26 ++++----------------------
 5 files changed, 24 insertions(+), 44 deletions(-)

base-commit: df701015aac3c13b1ecff311fda1a2ada2b9c1b2

Signature · 1 line
2.47.3