Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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>

+1 -2
+1 -2
fs/ntfs/sysctl.c
··· 27 27 .mode = 0644, /* Mode, proc handler. */ 28 28 .proc_handler = proc_dointvec 29 29 }, 30 - {} 31 30 }; 32 31 33 32 /* Storage for the sysctls header. */ ··· 41 42 int ntfs_sysctl(int add) 42 43 { 43 44 if (add) { 44 - sysctls_root_table = register_sysctl("fs", ntfs_sysctls); 45 + sysctls_root_table = register_sysctl("fs/ntfs", ntfs_sysctls); 45 46 if (!sysctls_root_table) 46 47 return -ENOMEM; 47 48 } else {