Skip to content

Commit f9fc28d

Browse files
sjp38gregkh
authored andcommitted
samples/damon/prcl: avoid starting DAMON before initialization
commit e6b733c upstream. 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/[email protected] Link: https://lore.kernel.org/[email protected] [1] Fixes: 2780505 ("samples/damon/prcl: fix boot time enable crash") Signed-off-by: SeongJae Park <[email protected]> Cc: <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 40108f6 commit f9fc28d

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
@@ -124,6 +124,9 @@ static int damon_sample_prcl_enable_store(
124124
if (enabled == is_enabled)
125125
return 0;
126126

127+
if (!init_called)
128+
return 0;
129+
127130
if (enabled) {
128131
err = damon_sample_prcl_start();
129132
if (err)

0 commit comments

Comments
 (0)