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:	Sun, 15 Dec 2013 22:52:37 +0300
From:	Sergei Shtylyov <sergei.shtylyov@...entembedded.com>
To:	davem@...emloft.net, Carolyn Wyborny <carolyn.wyborny@...el.com>
CC:	Jeff Kirsher <jeffrey.t.kirsher@...el.com>, netdev@...r.kernel.org,
	gospo@...hat.com, sassmann@...hat.com, stable@...r.kernel.org,
	sunil.k.pandey@...el.com, kevin.b.smith@...el.com
Subject: Re: [net 2/2] igb: Fix for issue where values could be too high for
 udelay function.

Hello.

On 12/14/2013 02:26 PM, Jeff Kirsher wrote:

> From: Carolyn Wyborny <carolyn.wyborny@...el.com>

> This patch changes the igb_phy_has_link function to check the value of the
> parameter before deciding to use udelay or mdelay in order to be sure that
> the value is not too high for udelay function.

> CC: stable kernel <stable@...r.kernel.org> # 3.9+
> Signed-off-by: Sunil K Pandey <sunil.k.pandey@...el.com>
> Signed-off-by: Kevin B Smith <kevin.b.smith@...el.com>
> Signed-off-by: Carolyn Wyborny <carolyn.wyborny@...el.com>
> Tested-by: Aaron Brown <aaron.f.brown@...el.com>
> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@...el.com>
> ---
>   drivers/net/ethernet/intel/igb/e1000_phy.c | 5 ++++-
>   1 file changed, 4 insertions(+), 1 deletion(-)

> diff --git a/drivers/net/ethernet/intel/igb/e1000_phy.c b/drivers/net/ethernet/intel/igb/e1000_phy.c
> index c4c4fe3..ad2b74d 100644
> --- a/drivers/net/ethernet/intel/igb/e1000_phy.c
> +++ b/drivers/net/ethernet/intel/igb/e1000_phy.c
> @@ -1728,7 +1728,10 @@ s32 igb_phy_has_link(struct e1000_hw *hw, u32 iterations,
>   			 * ownership of the resources, wait and try again to
>   			 * see if they have relinquished the resources yet.
>   			 */
> -			udelay(usec_interval);
> +			if (usec_interval >= 1000)
> +				mdelay(usec_interval/1000);

    There should be spaces around / at least for consistency with the previous 
line. Also, are you sure it shouldn't be mdelay(DIV_ROUND_UP(usec_interval, 
1000))?

WBR, Sergei

--
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