public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Don Zickus <dzickus@redhat.com>
To: Dave Young <hidave.darkstar@gmail.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	Ingo Molnar <mingo@elte.hu>, David Miller <davem@davemloft.net>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 01/05] use proc_dointvec_minmax to check boundaries while needed
Date: Thu, 3 Mar 2011 09:59:08 -0500	[thread overview]
Message-ID: <20110303145908.GA32154@redhat.com> (raw)
In-Reply-To: <20110303135819.GA2620@darkstar>

On Thu, Mar 03, 2011 at 09:58:20PM +0800, Dave Young wrote:
> proc_dointvec doesn't check extra minmax params, use proc_dointvec_minmax
> instead of proc_dointvec for cases need boundaries check.

Is this patch needed, if you are basically changing it again in patches 3
and 5?

Cheers,
Don

> 
> Signed-off-by: Dave Young <hidave.darkstar@gmail.com>
> ---
>  kernel/sysctl.c |   12 ++++++------
>  1 file changed, 6 insertions(+), 6 deletions(-)
> 
> --- linux-2.6.orig/kernel/sysctl.c	2011-03-03 10:44:53.000000000 +0800
> +++ linux-2.6/kernel/sysctl.c	2011-03-03 11:02:43.736663258 +0800
> @@ -374,7 +374,7 @@ static struct ctl_table kern_table[] = {
>  		.data		= &sysctl_sched_autogroup_enabled,
>  		.maxlen		= sizeof(unsigned int),
>  		.mode		= 0644,
> -		.proc_handler	= proc_dointvec,
> +		.proc_handler	= proc_dointvec_minmax,
>  		.extra1		= &zero,
>  		.extra2		= &one,
>  	},
> @@ -1204,7 +1204,7 @@ static struct ctl_table vm_table[] = {
>  		.data		= &block_dump,
>  		.maxlen		= sizeof(block_dump),
>  		.mode		= 0644,
> -		.proc_handler	= proc_dointvec,
> +		.proc_handler	= proc_dointvec_minmax,
>  		.extra1		= &zero,
>  	},
>  	{
> @@ -1212,7 +1212,7 @@ static struct ctl_table vm_table[] = {
>  		.data		= &sysctl_vfs_cache_pressure,
>  		.maxlen		= sizeof(sysctl_vfs_cache_pressure),
>  		.mode		= 0644,
> -		.proc_handler	= proc_dointvec,
> +		.proc_handler	= proc_dointvec_minmax,
>  		.extra1		= &zero,
>  	},
>  #ifdef HAVE_ARCH_PICK_MMAP_LAYOUT
> @@ -1221,7 +1221,7 @@ static struct ctl_table vm_table[] = {
>  		.data		= &sysctl_legacy_va_layout,
>  		.maxlen		= sizeof(sysctl_legacy_va_layout),
>  		.mode		= 0644,
> -		.proc_handler	= proc_dointvec,
> +		.proc_handler	= proc_dointvec_minmax,
>  		.extra1		= &zero,
>  	},
>  #endif
> @@ -1231,7 +1231,7 @@ static struct ctl_table vm_table[] = {
>  		.data		= &zone_reclaim_mode,
>  		.maxlen		= sizeof(zone_reclaim_mode),
>  		.mode		= 0644,
> -		.proc_handler	= proc_dointvec,
> +		.proc_handler	= proc_dointvec_minmax,
>  		.extra1		= &zero,
>  	},
>  	{
> @@ -1287,7 +1287,7 @@ static struct ctl_table vm_table[] = {
>  		.data		= &vdso_enabled,
>  		.maxlen		= sizeof(vdso_enabled),
>  		.mode		= 0644,
> -		.proc_handler	= proc_dointvec,
> +		.proc_handler	= proc_dointvec_minmax,
>  		.extra1		= &zero,
>  	},
>  #endif

  reply	other threads:[~2011-03-03 14:59 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-03 13:58 [PATCH 01/05] use proc_dointvec_minmax to check boundaries while needed Dave Young
2011-03-03 14:59 ` Don Zickus [this message]
2011-03-04  1:41   ` Dave Young
2011-03-04 14:04     ` Don Zickus
2011-03-04 15:21       ` Dave Young

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20110303145908.GA32154@redhat.com \
    --to=dzickus@redhat.com \
    --cc=akpm@linux-foundation.org \
    --cc=davem@davemloft.net \
    --cc=hidave.darkstar@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox