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:	Mon, 23 Jan 2012 10:45:25 +0100
From:	Eric Dumazet <eric.dumazet@...il.com>
To:	"Pradeep A. Dalvi" <netdev@...deepdalvi.com>
Cc:	netdev@...r.kernel.org, "David S. Miller" <davem@...emloft.net>,
	Christoph Hellwig <hch@....de>, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] netdev/ethernet: dev_alloc_skb to netdev_alloc_skb

Le dimanche 22 janvier 2012 à 02:27 +0530, Pradeep A. Dalvi a écrit :
> Replaced deprecating dev_alloc_skb with netdev_alloc_skb in drivers/net/ethernet
> 

...


> diff --git a/drivers/net/ethernet/3com/3c515.c b/drivers/net/ethernet/3com/3c515.c
> index f67a5d3..68fd765 100644
> --- a/drivers/net/ethernet/3com/3c515.c
> +++ b/drivers/net/ethernet/3com/3c515.c
> @@ -826,7 +826,7 @@ static int corkscrew_open(struct net_device *dev)
>  				vp->rx_ring[i].next = 0;
>  			vp->rx_ring[i].status = 0;	/* Clear complete bit. */
>  			vp->rx_ring[i].length = PKT_BUF_SZ | 0x80000000;
> -			skb = dev_alloc_skb(PKT_BUF_SZ);
> +			skb = netdev_alloc_skb(dev, PKT_BUF_SZ);
>  			vp->rx_skbuff[i] = skb;
>  			if (skb == NULL)
>  				break;	/* Bad news!  */


One of the difference between netdev_alloc_skb() and dev_alloc_skb() is
the former initializes skb->dev.

So you should remove the extra "skb->dev = dev;" lines that sometimes
are after the dev_alloc_skb() calls.

[ They were redundant anyway because eth_type_trans() also sets skb->dev
]

 

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