Skip to content

Commit e6b733c

Browse files
sjp38akpm00
authored andcommitted
samples/damon/prcl: avoid starting DAMON before initialization
Commit 2780505 ("samples/damon/prcl: fix boot time enable crash") is somehow incompletely applying the origin patch [1]. It is missing the part that avoids starting DAMON before module initialization. Probably a mistake during a merge has happened. Fix it by applying the missed part again. Link: https://lkml.kernel.org/r/20250909022238.2989-3-sj@kernel.org Link: https://lore.kernel.org/20250706193207.39810-3-sj@kernel.org [1] Fixes: 2780505 ("samples/damon/prcl: fix boot time enable crash") Signed-off-by: SeongJae Park <sj@kernel.org> Cc: <stable@vger.kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
1 parent f826ede commit e6b733c

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

samples/damon/prcl.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,9 @@ static int damon_sample_prcl_enable_store(
137137
if (enabled == is_enabled)
138138
return 0;
139139

140+
if (!init_called)
141+
return 0;
142+
140143
if (enabled) {
141144
err = damon_sample_prcl_start();
142145
if (err)

0 commit comments

Comments
 (0)