Re: [RFC] mm: prevent set a value less than 0 to min_free_kbytes

2014-01-08 Thread David Rientjes
On Wed, 8 Jan 2014, Han Pingtian wrote: > If echo -1 > /proc/vm/sys/min_free_kbytes, the system will hang. > Changing proc_dointvec() to proc_dointvec_minmax() in the > min_free_kbytes_sysctl_handler() can prevent this to happen. > > Signed-off-by: Han Pingtian Acked-by: David Rientjes Nice

Re: [RFC] mm: prevent set a value less than 0 to min_free_kbytes

2014-01-08 Thread Michal Hocko
On Wed 08-01-14 16:42:42, Han Pingtian wrote: > If echo -1 > /proc/vm/sys/min_free_kbytes, the system will hang. > Changing proc_dointvec() to proc_dointvec_minmax() in the > min_free_kbytes_sysctl_handler() can prevent this to happen. You can still do echo $BIG_VALUE >

[RFC] mm: prevent set a value less than 0 to min_free_kbytes

2014-01-08 Thread Han Pingtian
If echo -1 > /proc/vm/sys/min_free_kbytes, the system will hang. Changing proc_dointvec() to proc_dointvec_minmax() in the min_free_kbytes_sysctl_handler() can prevent this to happen. Signed-off-by: Han Pingtian --- mm/page_alloc.c |7 ++- 1 files changed, 6 insertions(+), 1

[RFC] mm: prevent set a value less than 0 to min_free_kbytes

2014-01-08 Thread Han Pingtian
If echo -1 /proc/vm/sys/min_free_kbytes, the system will hang. Changing proc_dointvec() to proc_dointvec_minmax() in the min_free_kbytes_sysctl_handler() can prevent this to happen. Signed-off-by: Han Pingtian ha...@linux.vnet.ibm.com --- mm/page_alloc.c |7 ++- 1 files changed, 6

Re: [RFC] mm: prevent set a value less than 0 to min_free_kbytes

2014-01-08 Thread Michal Hocko
On Wed 08-01-14 16:42:42, Han Pingtian wrote: If echo -1 /proc/vm/sys/min_free_kbytes, the system will hang. Changing proc_dointvec() to proc_dointvec_minmax() in the min_free_kbytes_sysctl_handler() can prevent this to happen. You can still do echo $BIG_VALUE /proc/vm/sys/min_free_kbytes

Re: [RFC] mm: prevent set a value less than 0 to min_free_kbytes

2014-01-08 Thread David Rientjes
On Wed, 8 Jan 2014, Han Pingtian wrote: If echo -1 /proc/vm/sys/min_free_kbytes, the system will hang. Changing proc_dointvec() to proc_dointvec_minmax() in the min_free_kbytes_sysctl_handler() can prevent this to happen. Signed-off-by: Han Pingtian ha...@linux.vnet.ibm.com Acked-by: