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 3/3] samples/damon/mtier: avoid starting DAMON before initialization
Date: Mon, 8 Sep 2025 19:22:38 -0700 [thread overview]
Message-ID: <20250909022238.2989-4-sj@kernel.org> (raw)
In-Reply-To: <20250909022238.2989-1-sj@kernel.org>
Commit 964314344eab ("samples/damon/mtier: support boot time enable
setup") 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-4-sj@kernel.org
Fixes: 964314344eab ("samples/damon/mtier: support boot time enable setup")
Cc: <stable@vger.kernel.org> # 6.17-rc1
Signed-off-by: SeongJae Park <sj@kernel.org>
---
samples/damon/mtier.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/samples/damon/mtier.c b/samples/damon/mtier.c
index 7ebd352138e4..beaf36657dea 100644
--- a/samples/damon/mtier.c
+++ b/samples/damon/mtier.c
@@ -208,6 +208,9 @@ static int damon_sample_mtier_enable_store(
if (enabled == is_enabled)
return 0;
+ if (!init_called)
+ return 0;
+
if (enabled) {
err = damon_sample_mtier_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 ` [PATCH 2/3] samples/damon/prcl: " SeongJae Park
2025-09-09 2:22 ` SeongJae Park [this message]
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-4-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.