From: yuan linyu <yuanlinyu@honor.com>
To: Alexander Potapenko <glider@google.com>,
Marco Elver <elver@google.com>,
Dmitry Vyukov <dvyukov@google.com>,
Andrew Morton <akpm@linux-foundation.org>,
Huacai Chen <chenhuacai@kernel.org>,
WANG Xuerui <kernel@xen0n.name>, <kasan-dev@googlegroups.com>,
<linux-mm@kvack.org>, <loongarch@lists.linux.dev>
Cc: <linux-kernel@vger.kernel.org>, yuan linyu <yuanlinyu@honor.com>
Subject: [PATCH 2/3] kfence: allow create debugfs dir/file unconditionally
Date: Thu, 18 Dec 2025 09:58:48 +0800 [thread overview]
Message-ID: <20251218015849.1414609-3-yuanlinyu@honor.com> (raw)
In-Reply-To: <20251218015849.1414609-1-yuanlinyu@honor.com>
When add boot parameter kfence.sample_interval=0, it will not create
debugfs dir/file, but when user change this parameter after boot,
it can enable kfence, there is no debugfs info to check the kfence
state.
Remove kfence_enabled check in kfence_debugfs_init() to create debugfs
unconditionally.
Signed-off-by: yuan linyu <yuanlinyu@honor.com>
---
mm/kfence/core.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/mm/kfence/core.c b/mm/kfence/core.c
index 577a1699c553..24c6f1fa5b19 100644
--- a/mm/kfence/core.c
+++ b/mm/kfence/core.c
@@ -782,9 +782,6 @@ static int kfence_debugfs_init(void)
{
struct dentry *kfence_dir;
- if (!READ_ONCE(kfence_enabled))
- return 0;
-
kfence_dir = debugfs_create_dir("kfence", NULL);
debugfs_create_file("stats", 0444, kfence_dir, NULL, &stats_fops);
debugfs_create_file("objects", 0400, kfence_dir, NULL, &objects_fops);
--
2.25.1
next prev parent reply other threads:[~2025-12-18 1:59 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-18 1:58 [PATCH 0/3] kfence: allow change objects number yuan linyu
2025-12-18 1:58 ` [PATCH 1/3] LoongArch: kfence: avoid use CONFIG_KFENCE_NUM_OBJECTS yuan linyu
2025-12-18 1:58 ` yuan linyu [this message]
2025-12-18 1:58 ` [PATCH 3/3] kfence: allow change number of object by early parameter yuan linyu
2025-12-18 23:58 ` Andrew Morton
2025-12-19 0:03 ` Marco Elver
2025-12-19 0:08 ` Andrew Morton
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=20251218015849.1414609-3-yuanlinyu@honor.com \
--to=yuanlinyu@honor.com \
--cc=akpm@linux-foundation.org \
--cc=chenhuacai@kernel.org \
--cc=dvyukov@google.com \
--cc=elver@google.com \
--cc=glider@google.com \
--cc=kasan-dev@googlegroups.com \
--cc=kernel@xen0n.name \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=loongarch@lists.linux.dev \
/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