lkml.org 
[lkml]   [2017]   [Apr]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 1/3] sysctl: add sanity check for proc_douintvec
    Date
    From: Liping Zhang <zlpnobody@gmail.com>

    Commit e7d316a02f68 ("sysctl: handle error writing UINT_MAX to u32 fields")
    introduced the proc_douintvec helper function, but it forgot to add
    the related sanity check when doing register_sysctl_table. So add it now.

    Signed-off-by: Liping Zhang <zlpnobody@gmail.com>
    ---
    fs/proc/proc_sysctl.c | 1 +
    1 file changed, 1 insertion(+)

    diff --git a/fs/proc/proc_sysctl.c b/fs/proc/proc_sysctl.c
    index 8f91ec6..d04ea43 100644
    --- a/fs/proc/proc_sysctl.c
    +++ b/fs/proc/proc_sysctl.c
    @@ -1074,6 +1074,7 @@ static int sysctl_check_table(const char *path, struct ctl_table *table)

    if ((table->proc_handler == proc_dostring) ||
    (table->proc_handler == proc_dointvec) ||
    + (table->proc_handler == proc_douintvec) ||
    (table->proc_handler == proc_dointvec_minmax) ||
    (table->proc_handler == proc_dointvec_jiffies) ||
    (table->proc_handler == proc_dointvec_userhz_jiffies) ||
    --
    2.5.5

    \
     
     \ /
      Last update: 2017-04-07 17:54    [W:3.848 / U:0.040 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site