diff options
author | Eric Dumazet <[email protected]> | 2010-10-15 14:34:12 -0700 |
---|---|---|
committer | Linus Torvalds <[email protected]> | 2010-10-15 14:42:24 -0700 |
commit | a9febbb4bd1302b6f01aa1203b0a804e4e5c9e25 (patch) | |
tree | 7367bee631d0a050e0d392102dd652ec48a57a08 | |
parent | 5a2b3ef4559f3d0ef58cbfb723f528f1c6b2e601 (diff) |
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 <[email protected]>
Signed-off-by: Eric Dumazet <[email protected]>
Cc: "Eric W. Biederman" <[email protected]>
Cc: David Miller <[email protected]>
Acked-by: WANG Cong <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
-rw-r--r-- | kernel/sysctl_check.c | 9 |
1 files changed, 0 insertions, 9 deletions
diff --git a/kernel/sysctl_check.c b/kernel/sysctl_check.c index 04cdcf72c827..10b90d8a03c4 100644 --- a/kernel/sysctl_check.c +++ b/kernel/sysctl_check.c @@ -143,15 +143,6 @@ int sysctl_check_table(struct nsproxy *namespaces, struct ctl_table *table) if (!table->maxlen) set_fail(&fail, table, "No maxlen"); } - if ((table->proc_handler == proc_doulongvec_minmax) || - (table->proc_handler == proc_doulongvec_ms_jiffies_minmax)) { - if (table->maxlen > sizeof (unsigned long)) { - if (!table->extra1) - set_fail(&fail, table, "No min"); - if (!table->extra2) - set_fail(&fail, table, "No max"); - } - } #ifdef CONFIG_PROC_SYSCTL if (table->procname && !table->proc_handler) set_fail(&fail, table, "No proc_handler"); |