mm-damonn-lru_sort-handle-ctx-allocation-failure.patch removed from -mm tree
The quilt patch titled
Subject: mm/damon/lru_sort: handle ctx allocation failure
has been removed from the -mm tree. Its filename was
mm-damonn-lru_sort-handle-ctx-allocation-failure.patch
This patch was dropped because it was merged into the mm-hotfixes-stable branch of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
------------------------------------------------------
From: SeongJae Park <[email protected]>
Subject: mm/damon/lru_sort: handle ctx allocation failure
Date: Thu, 28 May 2026 17:01:03 -0700
DAMON_LRU_SORT allocates the damon_ctx object for its kdamond in its init function. damon_lru_sort_enabled_store() wrongly assumes the allocation will always succeed once tried. If the damon_ctx allocation was failed, therefore, code execution reaches to damon_commit_ctx() while 'ctx' is NULL. As a result, it dereferences the NULL 'ctx' pointer. Avoid the NULL dereference by returning -ENOMEM if 'ctx' is NULL.
---
mm/damon/lru_sort.c | 4 ++++ 1 file changed, 4 insertions(+)
mm/damon/lru_sort.c renamed from mm/damon/lru_sort.c~mm-damonn-lru_sort-handle-ctx-allocation-failure +4 -0
@@ -437,6 +437,10 @@ static int damon_lru_sort_enabled_store(if (!damon_initialized ())return 0 ; +/* damon_modules_new_paddr_ctx_target() in the init function failed. */ +if (!ctx) +return -ENOMEM ; +return damon_lru_sort_turn (enabled); }
_
Patches currently in -mm which might be from [email protected] are
maintainers-add-testing-abi-documents-for-mm.patch