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] [day] [month] [year] [list]
Date:	Sat, 24 May 2014 01:04:50 -0700
From:	Prashant <prashant@...adcom.com>
To:	David Miller <davem@...emloft.net>
CC:	<netdev@...r.kernel.org>, <mchan@...adcom.com>
Subject: Re: [PATCH net-next] tg3: Override clock, link aware and link idle
 mode during NVRAM dump



On 5/23/2014 9:17 PM, David Miller wrote:
> From: Prashant Sreedharan <prashant@...adcom.com>
> Date: Fri, 23 May 2014 09:54:44 -0700
>
>> +		if (cpmu_val & (CPMU_CTRL_LINK_AWARE_MODE |
>> +				CPMU_CTRL_LINK_IDLE_MODE)) {
>> +
>
> Please remove this empty line.
Ok
>
>> +			tw32(TG3_CPMU_CTRL, cpmu_val &
>> +			     ~(CPMU_CTRL_LINK_AWARE_MODE |
>> +			       CPMU_CTRL_LINK_IDLE_MODE));
>
> This is not indented correctly.
>
> The ~() expression is part of the "cpum_val &", it's not
> another separate argument to tw32().
>
> Therefore ~() should be indented to the column cpum_val starts
> at.
>
Will fix indentation.
>> +		if (need_resched()) {
>> +			if (signal_pending(current)) {
>> +				eeprom->len += i;
>> +				ret = -EINTR;
>> +				goto eeprom_done;
>
> Why are you incrementing eeprom->len when you break out of the
> loop due to a signal?  You didn't read that extra byte.
>
eeprom->len is discarded by caller if a failure is returned.
I will resend the patch after incorporating comments and add your 
Reviewed-by. Thanks.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ