lkml.org 
[lkml]   [2011]   [Apr]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[34-longterm 106/209] sysctl: min/max bounds are optional
    Date
    From: Eric Dumazet <eric.dumazet@gmail.com>

    =====================================================================
    | This is a commit scheduled for the next v2.6.34 longterm release. |
    | If you see a problem with using this for longterm, please comment.|
    =====================================================================

    commit a9febbb4bd1302b6f01aa1203b0a804e4e5c9e25 upstream

    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>
    Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
    ---
    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 04cdcf7..10b90d8 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");
    --
    1.7.4.4


    \
     
     \ /
      Last update: 2011-04-14 19:51    [W:0.021 / U:123.192 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site