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:	Tue, 20 Feb 2007 11:26:01 -0500
From:	Jeff Garzik <jeff@...zik.org>
To:	Ayaz Abdulla <aabdulla@...dia.com>
CC:	Manfred Spraul <manfred@...orfullife.com>,
	Andrew Morton <akpm@...l.org>, nedev <netdev@...r.kernel.org>
Subject: Re: [PATCH 1/3] forcedeth: fixed missing call in napi poll

Ayaz Abdulla wrote:
> The napi poll routine was missing the call to the optimized rx process 
> routine. This patch adds the missing call for the optimized path.
> 
> Signed-Off-By: Ayaz Abdulla <aabdulla@...dia.com>
> 
> 
> ------------------------------------------------------------------------
> 
> --- orig/drivers/net/forcedeth.c	2007-02-19 09:13:10.000000000 -0500
> +++ new/drivers/net/forcedeth.c	2007-02-19 09:13:46.000000000 -0500
> @@ -3104,13 +3104,17 @@
>  	struct fe_priv *np = netdev_priv(dev);
>  	u8 __iomem *base = get_hwbase(dev);
>  	unsigned long flags;
> +	u32 retcode;
>  
> -	if (np->desc_ver == DESC_VER_1 || np->desc_ver == DESC_VER_2)
> +	if (np->desc_ver == DESC_VER_1 || np->desc_ver == DESC_VER_2) {
>  		pkts = nv_rx_process(dev, limit);
> -	else
> +		retcode = nv_alloc_rx(dev);
> +	} else {
>  		pkts = nv_rx_process_optimized(dev, limit);
> +		retcode = nv_alloc_rx_optimized(dev);
> +	}
>  
> -	if (nv_alloc_rx(dev)) {
> +	if (retcode) {

You should update this patch to change the return values of the above 
two functions from 'int' to 'u32', to match the code usage.  Both 
nv_rx_process() and nv_alloc_rx_optimized() return int, but you use them 
as if they return u32.

Or alternately, use the Linux kernel standard of negative values 
indicating failure, zero (or perhaps >=0) indicates success.

Otherwise, ACK.

	Jeff



-
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