summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNamjae Jeon <linkinjeon@kernel.org>2026-03-01 08:52:16 +0300
committerNamjae Jeon <linkinjeon@kernel.org>2026-03-01 08:53:37 +0300
commita8fde8be9aa8e5f10ef73b59b2ad4fba585ccdc5 (patch)
tree6831ee2c9642f1626726b5ec756c4991c0a9e8e2
parente6eb3a0584628f84e6f3fcf258fba8fd11f42d2e (diff)
downloadlinux-a8fde8be9aa8e5f10ef73b59b2ad4fba585ccdc5.tar.xz
ntfs: fix sysctl table registration and path
The presence of a sentinel (an empty {}) at the end of the ctl_table array now causes a "sysctl table check failed" error because the kernel attempts to validate the null entry as a functional node. Deleted the empty {} from the ntfs_sysctls array to prevent the "procname is null" and "No proc_handler" errors and updated the base path from "fs" to "fs/ntfs" to ensure the ntfs-debug node is correctly located under /proc/sys/fs/ntfs/. Reported-by: Woody Suwalski <terraluna977@gmail.com> Signed-off-by: Namjae Jeon <linkinjeon@kernel.org>
-rw-r--r--fs/ntfs/sysctl.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/fs/ntfs/sysctl.c b/fs/ntfs/sysctl.c
index aa4a821a117b..8c5c1b7cd483 100644
--- a/fs/ntfs/sysctl.c
+++ b/fs/ntfs/sysctl.c
@@ -27,7 +27,6 @@ static const struct ctl_table ntfs_sysctls[] = {
.mode = 0644, /* Mode, proc handler. */
.proc_handler = proc_dointvec
},
- {}
};
/* Storage for the sysctls header. */
@@ -42,7 +41,7 @@ static struct ctl_table_header *sysctls_root_table;
int ntfs_sysctl(int add)
{
if (add) {
- sysctls_root_table = register_sysctl("fs", ntfs_sysctls);
+ sysctls_root_table = register_sysctl("fs/ntfs", ntfs_sysctls);
if (!sysctls_root_table)
return -ENOMEM;
} else {