From: SeongJae Park <sj@kernel.org>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: SeongJae Park <sj@kernel.org>,
"# 6 . 17-rc1" <stable@vger.kernel.org>,
damon@lists.linux.dev, kernel-team@meta.com,
linux-kernel@vger.kernel.org, linux-mm@kvack.org
Subject: [PATCH 2/3] samples/damon/prcl: avoid starting DAMON before initialization
Date: Mon, 8 Sep 2025 19:22:37 -0700 [thread overview]
Message-ID: <20250909022238.2989-3-sj@kernel.org> (raw)
In-Reply-To: <20250909022238.2989-1-sj@kernel.org>
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.
[1] https://lore.kernel.org/20250706193207.39810-3-sj@kernel.org
Fixes: 2780505ec2b4 ("samples/damon/prcl: fix boot time enable crash")
Cc: <stable@vger.kernel.org> # 6.17-rc1
Signed-off-by: SeongJae Park <sj@kernel.org>
---
samples/damon/prcl.c | 3 +++
1 file changed, 3 insertions(+)
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)
--
2.39.5
next prev parent reply other threads:[~2025-09-09 2:22 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-09 2:22 [PATCH 0/3] samples/damon: fix boot time enable handling fixup merge mistakes SeongJae Park
2025-09-09 2:22 ` [PATCH 1/3] samples/damon/wsse: avoid starting DAMON before initialization SeongJae Park
2025-09-09 2:22 ` SeongJae Park [this message]
2025-09-09 2:22 ` [PATCH 3/3] samples/damon/mtier: " SeongJae Park
2025-09-09 2:35 ` [PATCH 0/3] samples/damon: fix boot time enable handling fixup merge mistakes Andrew Morton
2025-09-09 3:51 ` SeongJae Park
2025-09-09 4:18 ` Andrew Morton
2025-09-09 4:30 ` SeongJae Park
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250909022238.2989-3-sj@kernel.org \
--to=sj@kernel.org \
--cc=akpm@linux-foundation.org \
--cc=damon@lists.linux.dev \
--cc=kernel-team@meta.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=stable@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.