Re: [PATCH v2] proc_sysctl: fix oops caused by incorrect command parameters.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon 11-01-21 11:48:19, Xiaoming Ni wrote:
[...]
> patch3:
> 	+++ b/fs/proc/proc_sysctl.c
> 	@@ -1770,6 +1770,9 @@ static int process_sysctl_arg(char *param, char *val,
> 							return 0;
> 			}
> 
> 	+       if (!val)
> 	+               return -EINVAL;
> 	+
> 			/*
> 			 * To set sysctl options, we use a temporary mount of proc, look up the
> 			 * respective sys/ file and write to it. To avoid mounting it when no
> 
> sysctl log for patch3:
> 	Setting sysctl args: `' invalid for parameter `hung_task_panic'
[...]
> When process_sysctl_arg() is called, the param parameter may not be the
> sysctl parameter.
> 
> Patch3 or patch4, which is better?

Patch3

-- 
Michal Hocko
SUSE Labs



[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux