aboutsummaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
Diffstat (limited to 'kernel')
-rw-r--r--kernel/sysctl.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/kernel/sysctl.c b/kernel/sysctl.c
index 0c8e805bbd6f..09e569f4792b 100644
--- a/kernel/sysctl.c
+++ b/kernel/sysctl.c
@@ -1315,7 +1315,9 @@ repeat:
1315 return -ENOTDIR; 1315 return -ENOTDIR;
1316 if (get_user(n, name)) 1316 if (get_user(n, name))
1317 return -EFAULT; 1317 return -EFAULT;
1318 for ( ; table->ctl_name; table++) { 1318 for ( ; table->ctl_name || table->procname; table++) {
1319 if (!table->ctl_name)
1320 continue;
1319 if (n == table->ctl_name || table->ctl_name == CTL_ANY) { 1321 if (n == table->ctl_name || table->ctl_name == CTL_ANY) {
1320 int error; 1322 int error;
1321 if (table->child) { 1323 if (table->child) {
@@ -1532,7 +1534,7 @@ static void register_proc_table(ctl_table * table, struct proc_dir_entry *root,
1532 int len; 1534 int len;
1533 mode_t mode; 1535 mode_t mode;
1534 1536
1535 for (; table->ctl_name; table++) { 1537 for (; table->ctl_name || table->procname; table++) {
1536 /* Can't do anything without a proc name. */ 1538 /* Can't do anything without a proc name. */
1537 if (!table->procname) 1539 if (!table->procname)
1538 continue; 1540 continue;
@@ -1579,7 +1581,7 @@ static void register_proc_table(ctl_table * table, struct proc_dir_entry *root,
1579static void unregister_proc_table(ctl_table * table, struct proc_dir_entry *root) 1581static void unregister_proc_table(ctl_table * table, struct proc_dir_entry *root)
1580{ 1582{
1581 struct proc_dir_entry *de; 1583 struct proc_dir_entry *de;
1582 for (; table->ctl_name; table++) { 1584 for (; table->ctl_name || table->procname; table++) {
1583 if (!(de = table->de)) 1585 if (!(de = table->de))
1584 continue; 1586 continue;
1585 if (de->mode & S_IFDIR) { 1587 if (de->mode & S_IFDIR) {