diff options
| author | SeongJae Park <[email protected]> | 2025-09-09 02:22:37 +0000 |
|---|---|---|
| committer | Andrew Morton <[email protected]> | 2025-09-13 20:05:37 +0000 |
| commit | e6b733ca2f99e968d696c2e812c8eb8e090bf37b (patch) | |
| tree | a7b10713b24a4cbbca1ef8429a77cdf82575b379 | |
| parent | samples/damon/wsse: avoid starting DAMON before initialization (diff) | |
| download | kernel-e6b733ca2f99e968d696c2e812c8eb8e090bf37b.tar.gz kernel-e6b733ca2f99e968d696c2e812c8eb8e090bf37b.zip | |
samples/damon/prcl: avoid starting DAMON before initialization
Commit 2780505ec2b4 ("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: 2780505ec2b4 ("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]>
| -rw-r--r-- | samples/damon/prcl.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/samples/damon/prcl.c b/samples/damon/prcl.c index 1b839c06a612..0226652f94d5 100644 --- a/samples/damon/prcl.c +++ b/samples/damon/prcl.c @@ -137,6 +137,9 @@ static int damon_sample_prcl_enable_store( if (enabled == is_enabled) return 0; + if (!init_called) + return 0; + if (enabled) { err = damon_sample_prcl_start(); if (err) |
