From: Alexey Dobriyan Date: Mon, 26 Oct 2009 23:50:07 +0000 (-0700) Subject: sysctl: fix false positives when PROC_SYSCTL=n X-Git-Tag: v3.0~7106 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=8c85dd8730bfb696e691145335f884c7baef8277;p=platform%2Fkernel%2Flinux-amlogic.git 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=14408 Signed-off-by: Alexey Dobriyan Reported-by: Peter Teoh Cc: "Eric W. Biederman" Cc: "Rafael J. Wysocki" Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/kernel/sysctl_check.c b/kernel/sysctl_check.c index b38423c..b6e7aaea 100644 --- a/kernel/sysctl_check.c +++ b/kernel/sysctl_check.c @@ -1521,7 +1521,7 @@ int sysctl_check_table(struct nsproxy *namespaces, struct ctl_table *table) if (!table->ctl_name && table->strategy) set_fail(&fail, table, "Strategy without ctl_name"); #endif -#ifdef CONFIG_PROC_FS +#ifdef CONFIG_PROC_SYSCTL if (table->procname && !table->proc_handler) set_fail(&fail, table, "No proc_handler"); #endif