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:	Mon, 23 Jan 2012 18:45:37 +0530
From:	"Pradeep A. Dalvi" <netdev@...deepdalvi.com>
To:	Eric Dumazet <eric.dumazet@...il.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

On Mon, Jan 23, 2012 at 4:07 PM, Pradeep A. Dalvi
<netdev@...deepdalvi.com> wrote:
> On Mon, Jan 23, 2012 at 3:15 PM, Eric Dumazet <eric.dumazet@...il.com> wrote:
>> 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
>> ]
>
> Thanks! Shall take extra skb->dev = dev into consideration.
>
> Eric, is this ok to assume that the memory address given to
> dma_map_single & received from dma_unmap_single would remain same
> across all platforms? Thanks in advance!

Eric, please ignore last question. Realized my mistake! :-)
--
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