提交 8c85dd87 编写于 作者: A Alexey Dobriyan 提交者: Linus Torvalds

sysctl: fix false positives when PROC_SYSCTL=n

Having ->procname but not ->proc_handler is valid when PROC_SYSCTL=n,
people use such combination to reduce ifdefs with non-standard handlers.

Addresses http://bugzilla.kernel.org/show_bug.cgi?id=14408Signed-off-by: NAlexey Dobriyan <adobriyan@gmail.com>
Reported-by: tthtlc's avatarPeter Teoh <htmldeveloper@gmail.com>
Cc: "Eric W. Biederman" <ebiederm@xmission.com>
Cc: "Rafael J. Wysocki" <rjw@sisk.pl>
Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
上级 115a57c5
...@@ -1521,7 +1521,7 @@ int sysctl_check_table(struct nsproxy *namespaces, struct ctl_table *table) ...@@ -1521,7 +1521,7 @@ int sysctl_check_table(struct nsproxy *namespaces, struct ctl_table *table)
if (!table->ctl_name && table->strategy) if (!table->ctl_name && table->strategy)
set_fail(&fail, table, "Strategy without ctl_name"); set_fail(&fail, table, "Strategy without ctl_name");
#endif #endif
#ifdef CONFIG_PROC_FS #ifdef CONFIG_PROC_SYSCTL
if (table->procname && !table->proc_handler) if (table->procname && !table->proc_handler)
set_fail(&fail, table, "No proc_handler"); set_fail(&fail, table, "No proc_handler");
#endif #endif
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册