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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4F7B7F9B.3050503@antcom.de>
Date:	Wed, 04 Apr 2012 00:54:19 +0200
From:	Roland Stigge <stigge@...com.de>
To:	Eric Dumazet <eric.dumazet@...il.com>
CC:	netdev@...r.kernel.org, David Miller <davem@...emloft.net>
Subject: Re: [PATCH] net: lpc_eth: no need to reserve 8 extra bytes in rx
 skb

Hi Eric,

On 04/04/12 00:02, Eric Dumazet wrote:
> Probably a leftover from ancient code...

...

> --- a/drivers/net/ethernet/nxp/lpc_eth.c
> +++ b/drivers/net/ethernet/nxp/lpc_eth.c
> @@ -990,10 +990,10 @@ static int __lpc_handle_recv(struct net_device *ndev, int budget)
>  			ndev->stats.rx_errors++;
>  		} else {
>  			/* Packet is good */
> -			skb = dev_alloc_skb(len + 8);
> -			if (!skb)
> +			skb = dev_alloc_skb(len);

I remember this issue from the discussion, a note from Ben Hutchings
actually, where there was a further "skb_reserve(skb, 8);" in the "else"
case below. Looks like I only removed the skb_reserve().

Can't find this review from you - I hope there are no other issues left?
(Was I on CC?)

> +			if (!skb) {
>  				ndev->stats.rx_dropped++;
> -			else {
> +			} else {

Why add curly braces around a single statement?

Thanks,

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