Linux-mm Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [RFC PATCH 0/2] mm/damon/{reclaim,lru_sort}: handle ctx allocation failures
@ 2026-05-28  6:11 SeongJae Park
  2026-05-28  6:11 ` [RFC PATCH 1/2] mm/damon/reclaim: handle ctx allocation failure SeongJae Park
  2026-05-28  6:11 ` [RFC PATCH 2/2] mm/damonn/lru_sort: " SeongJae Park
  0 siblings, 2 replies; 3+ messages in thread
From: SeongJae Park @ 2026-05-28  6:11 UTC (permalink / raw)
  Cc: SeongJae Park, # 6 . 18 . x, Andrew Morton, damon, linux-kernel,
	linux-mm

DAMON_RECLAIM and DAMON_LRU_SORT could dereference NULL pointers if
their damon_ctx object allocations fail.  The bug is expected to happen
not frequently,, because the allocation is arguably too small to fail on
common setup.  But theoretically it is possible and the consequence is
bad.  Fix those.

The issue was discovered [1] by Sashiko.

[1] https://lore.kernel.org/20260419014800.877-1-sj@kernel.org

SeongJae Park (2):
  mm/damon/reclaim: handle ctx allocation failure
  mm/damonn/lru_sort: handle ctx allocation failure

 mm/damon/lru_sort.c | 4 ++++
 mm/damon/reclaim.c  | 4 ++++
 2 files changed, 8 insertions(+)


base-commit: 3c18aac8c775b020a2c50e91051f106dc621ad3e
-- 
2.47.3


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

end of thread, other threads:[~2026-05-28  6:11 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-28  6:11 [RFC PATCH 0/2] mm/damon/{reclaim,lru_sort}: handle ctx allocation failures SeongJae Park
2026-05-28  6:11 ` [RFC PATCH 1/2] mm/damon/reclaim: handle ctx allocation failure SeongJae Park
2026-05-28  6:11 ` [RFC PATCH 2/2] mm/damonn/lru_sort: " SeongJae Park

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