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