lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Tue, 20 Aug 2013 13:17:53 +0800
From:	Chen Gang <gang.chen@...anux.com>
To:	Joe Perches <joe@...ches.com>
CC:	Ingo Molnar <mingo@...nel.org>,
	"a.p.zijlstra@...llo.nl" <a.p.zijlstra@...llo.nl>,
	Mel Gorman <mgorman@...e.de>, riel@...hat.com,
	Andrew Morton <akpm@...ux-foundation.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 1/2] kernel/sysctl.c: check return value after call proc_put_char()
 in __do_proc_doulongvec_minmax()

On 08/20/2013 01:09 PM, Joe Perches wrote:
> On Tue, 2013-08-20 at 11:38 +0800, Chen Gang wrote:
>> Need check the return value of proc_put_char(), just like another have
>> done in __do_proc_doulongvec_minmax().
>>
>> Signed-off-by: Chen Gang <gang.chen@...anux.com>
>> ---
>>  kernel/sysctl.c |    5 ++++-
>>  1 files changed, 4 insertions(+), 1 deletions(-)
>>
>> diff --git a/kernel/sysctl.c b/kernel/sysctl.c
>> index 7822cd8..ee00986 100644
>> --- a/kernel/sysctl.c
>> +++ b/kernel/sysctl.c
>> @@ -2214,8 +2214,11 @@ static int __do_proc_doulongvec_minmax(void *data, struct ctl_table *table, int
>>  			*i = val;
>>  		} else {
>>  			val = convdiv * (*i) / convmul;
>> -			if (!first)
>> +			if (!first) {
>>  				err = proc_put_char(&buffer, &left, '\t');
>> +				if (err)
>> +					goto free;
>> +			}
> 
> I think you should use break and convert it in
> to goto free in patch 2/2.
> 
> Otherwise, this style looks out of place.
> 

Hmm... It sounds reasonable to me, if necessary, I will send patch v2
for them (no reply means not need send patch v2, this time).

Thanks.

>>  			err = proc_put_long(&buffer, &left, val, false);
>>  			if (err)
>>  				break;
> 
> 
> 
> 
> 


-- 
Chen Gang
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ