Currently sysctl_check_table will complain if a strategy routine
is missing when we have sys_sysctl compiled out, or a proc_handler
is missing when we have procfs compiled out. At least some
of the custom handlers actually expand to NULL when this is the
case so the warning is actually a problem.
Valdis.Kletnieks@vt.edu writes:
So don't worry about missing strategy routines, or missing proc_handler
routines when they will never be called.
Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
---
kernel/sysctl_check.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/kernel/sysctl_check.c b/kernel/sysctl_check.c
index aa5b6f6..10dd744 100644
--- a/kernel/sysctl_check.c
+++ b/kernel/sysctl_check.c
@@ -1552,14 +1552,18 @@ int sysctl_check_table(struct ctl_table *table)
set_fail(&fail, table, "No max");
}
}
+#ifdef CONFIG_SYSCTL_SYSCALL
if (table->ctl_name && !table->strategy)
set_fail(&fail, table, "Missing strategy");
+#endif
#if 0
if (!table->ctl_name && table->strategy)
set_fail(&fail, table, "Strategy without ctl_name");
#endif
+#ifdef CONFIG_PROC_FS
if (table->procname && !table->proc_handler)
set_fail(&fail, table, "No proc_handler");
+#endif
#if 0
if (!table->procname && table->proc_handler)
set_fail(&fail, table, "proc_handler without procname");
--
1.5.3.rc6.17.g1911
-