linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH mm-stable 1/1] mm/damon/paddr: initialize nr_succeeded in __damon_pa_migrate_folio_list()
@ 2024-07-01 16:53 SeongJae Park
  0 siblings, 0 replies; only message in thread
From: SeongJae Park @ 2024-07-01 16:53 UTC (permalink / raw)
  To: Andrew Morton
  Cc: SeongJae Park, Hyeongtak Ji, Honggyu Kim, damon, linux-mm,
	linux-kernel, kernel test robot, Dan Carpenter

The variable is supposed to be set via later migrate_pages() call.
However, the function does not do that when CONFIG_MIGRATION is unset.
Initialize the variable to zero.

Fixes: 5311c0a2eee3 ("mm/damon/paddr: introduce DAMOS_MIGRATE_COLD action for demotion") # mm-stable
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@linaro.org>
Closes: https://lore.kernel.org/r/202406251102.GE07hqfQ-lkp@intel.com/
Signed-off-by: SeongJae Park <sj@kernel.org>
---
 mm/damon/paddr.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/mm/damon/paddr.c b/mm/damon/paddr.c
index af6aac388a43..a9ff35341d65 100644
--- a/mm/damon/paddr.c
+++ b/mm/damon/paddr.c
@@ -332,7 +332,7 @@ static unsigned int __damon_pa_migrate_folio_list(
 		struct list_head *migrate_folios, struct pglist_data *pgdat,
 		int target_nid)
 {
-	unsigned int nr_succeeded;
+	unsigned int nr_succeeded = 0;
 	nodemask_t allowed_mask = NODE_MASK_NONE;
 	struct migration_target_control mtc = {
 		/*
-- 
2.39.2



^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2024-07-01 16:53 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-07-01 16:53 [PATCH mm-stable 1/1] mm/damon/paddr: initialize nr_succeeded in __damon_pa_migrate_folio_list() SeongJae Park

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).