Commit 814ecf6e authored by Denis Kirjanov's avatar Denis Kirjanov Committed by Linus Torvalds

sysctl_check: drop table->procname checks

Since the for loop checks for the table->procname drop useless
table->procname checks inside the loop body
Signed-off-by: default avatarDenis Kirjanov <dkirjanov@kernel.org>
Cc: "Eric W. Biederman" <ebiederm@xmission.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent ad4ac17a
...@@ -111,11 +111,9 @@ int sysctl_check_table(struct nsproxy *namespaces, struct ctl_table *table) ...@@ -111,11 +111,9 @@ int sysctl_check_table(struct nsproxy *namespaces, struct ctl_table *table)
const char *fail = NULL; const char *fail = NULL;
if (table->parent) { if (table->parent) {
if (table->procname && !table->parent->procname) if (!table->parent->procname)
set_fail(&fail, table, "Parent without procname"); set_fail(&fail, table, "Parent without procname");
} }
if (!table->procname)
set_fail(&fail, table, "No procname");
if (table->child) { if (table->child) {
if (table->data) if (table->data)
set_fail(&fail, table, "Directory with data?"); set_fail(&fail, table, "Directory with data?");
...@@ -144,7 +142,7 @@ int sysctl_check_table(struct nsproxy *namespaces, struct ctl_table *table) ...@@ -144,7 +142,7 @@ int sysctl_check_table(struct nsproxy *namespaces, struct ctl_table *table)
set_fail(&fail, table, "No maxlen"); set_fail(&fail, table, "No maxlen");
} }
#ifdef CONFIG_PROC_SYSCTL #ifdef CONFIG_PROC_SYSCTL
if (table->procname && !table->proc_handler) if (!table->proc_handler)
set_fail(&fail, table, "No proc_handler"); set_fail(&fail, table, "No proc_handler");
#endif #endif
#if 0 #if 0
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment