lkml.org 
[lkml]   [2009]   [Oct]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH] sysctl: fix false positives when PROC_SYSCTL=n
Alexey Dobriyan <adobriyan@gmail.com> writes:

> Having ->procname but not ->proc_handler is valid when PROC_SYSCTL=n,
> people use such combination to reduce ifdefs with non-standard handlers.
>
> http://bugzilla.kernel.org/show_bug.cgi?id=14408

Acked-by: "Eric W. Biederman" <ebiederm@xmission.com>

It looks like I messed up when I wrote sysctl_check.c and used the
wrong ifdef. Silly me. Especially since I had added PROC_SYSCTL
earlier.

Eric


> Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
> ---
>
> kernel/sysctl_check.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> --- 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


\
 
 \ /
  Last update: 2009-10-16 11:49    [W:0.057 / U:0.232 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site