Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

sysctl: min/max bounds are optional

sysctl check complains with a WARN() when proc_doulongvec_minmax() or
proc_doulongvec_ms_jiffies_minmax() are used by a vector of longs (with
more than one element), with no min or max value specified.

This is unexpected, given we had a bug on this min/max handling :)

Reported-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Cc: "Eric W. Biederman" <ebiederm@xmission.com>
Cc: David Miller <davem@davemloft.net>
Acked-by: WANG Cong <xiyou.wangcong@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

authored by

Eric Dumazet and committed by
Linus Torvalds
a9febbb4 5a2b3ef4

-9
-9
kernel/sysctl_check.c
··· 143 143 if (!table->maxlen) 144 144 set_fail(&fail, table, "No maxlen"); 145 145 } 146 - if ((table->proc_handler == proc_doulongvec_minmax) || 147 - (table->proc_handler == proc_doulongvec_ms_jiffies_minmax)) { 148 - if (table->maxlen > sizeof (unsigned long)) { 149 - if (!table->extra1) 150 - set_fail(&fail, table, "No min"); 151 - if (!table->extra2) 152 - set_fail(&fail, table, "No max"); 153 - } 154 - } 155 146 #ifdef CONFIG_PROC_SYSCTL 156 147 if (table->procname && !table->proc_handler) 157 148 set_fail(&fail, table, "No proc_handler");