summaryrefslogtreecommitdiff
path: root/drivers/clk/aspeed/git@git.tavy.me:linux.git
diff options
context:
space:
mode:
authorSeongJae Park <sj@kernel.org>2026-05-28 17:01:03 -0700
committerAndrew Morton <akpm@linux-foundation.org>2026-06-03 16:25:51 -0700
commitab04340b5ae5d52c1d46b750538febcde9d889e7 (patch)
tree48c962065a63ea65bd4a103e16cc795280d2268b /drivers/clk/aspeed/git@git.tavy.me:linux.git
parent7e2ed8a29427af534bf2cb9b8bc51762b8b6e654 (diff)
mm/damon/lru_sort: handle ctx allocation failure
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. Link: https://lore.kernel.org/20260529000104.7006-3-sj@kernel.org Fixes: c4a8e662c839 ("mm/damon/lru_sort: use damon_initialized()") Signed-off-by: SeongJae Park <sj@kernel.org> Cc: <stable@vger.kernel.org> # 6.18.x Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'drivers/clk/aspeed/git@git.tavy.me:linux.git')
0 files changed, 0 insertions, 0 deletions