From: Sasha Levin <sashal@kernel.org>
To: stable@vger.kernel.org
Cc: SeongJae Park <sj@kernel.org>,
Andrew Morton <akpm@linux-foundation.org>,
Sasha Levin <sashal@kernel.org>
Subject: [PATCH 6.16.y 3/3] samples/damon/mtier: avoid starting DAMON before initialization
Date: Sun, 21 Sep 2025 10:11:19 -0400 [thread overview]
Message-ID: <20250921141119.2917725-3-sashal@kernel.org> (raw)
In-Reply-To: <20250921141119.2917725-1-sashal@kernel.org>
From: SeongJae Park <sj@kernel.org>
[ Upstream commit c62cff40481c037307a13becbda795f7afdcfebd ]
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.
Link: https://lkml.kernel.org/r/20250909022238.2989-4-sj@kernel.org
Link: https://lore.kernel.org/20250706193207.39810-4-sj@kernel.org [1]
Fixes: 964314344eab ("samples/damon/mtier: support boot time enable setup")
Signed-off-by: SeongJae Park <sj@kernel.org>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Sasha Levin <sashal@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 11cbfea1af675..88156145172f1 100644
--- a/samples/damon/mtier.c
+++ b/samples/damon/mtier.c
@@ -166,6 +166,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.51.0
prev parent reply other threads:[~2025-09-21 14:11 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-21 12:18 FAILED: patch "[PATCH] samples/damon/mtier: avoid starting DAMON before" failed to apply to 6.16-stable tree gregkh
2025-09-21 14:11 ` [PATCH 6.16.y 1/3] samples/damon/prcl: fix boot time enable crash Sasha Levin
2025-09-21 14:11 ` [PATCH 6.16.y 2/3] samples/damon: change enable parameters to enabled Sasha Levin
2025-09-21 14:11 ` Sasha Levin [this message]
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=20250921141119.2917725-3-sashal@kernel.org \
--to=sashal@kernel.org \
--cc=akpm@linux-foundation.org \
--cc=sj@kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox