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]
Message-ID: <CA+Dx6HbgoSgeLFCarF5MAh_z5psWyLEb9UVbhKXCjmxm4OsA8w@mail.gmail.com>
Date:	Tue, 24 Jan 2012 03:52:17 +0530
From:	"Pradeep A. Dalvi" <netdev@...deepdalvi.com>
To:	David Miller <davem@...emloft.net>
Cc:	eric.dumazet@...il.com, netdev@...r.kernel.org,
	linux-kernel@...r.kernel.org, hch@....de
Subject: Re: [PATCH/RESEND net 5/5][NON-TRIVIAL] drivers/net/ethernet:
 dev_alloc_skb to netdev_alloc_skb

On Tue, Jan 24, 2012 at 3:25 AM, David Miller <davem@...emloft.net> wrote:
> From: Eric Dumazet <eric.dumazet@...il.com>
> Date: Mon, 23 Jan 2012 22:04:27 +0100
>
>> Le mardi 24 janvier 2012 à 02:24 +0530, Pradeep A. Dalvi a écrit :
>>> Replaced deprecating dev_alloc_skb with netdev_alloc_skb in drivers/net/ethernet
>>>   - Removed extra skb->dev = dev after netdev_alloc_skb
>>>
>>
>>
>>>
>>>  /* Initialize the LANCE Rx and Tx rings. */
>>>  static void
>>> -lance_init_ring(struct net_device *dev, gfp_t gfp)
>>> +lance_init_ring(struct net_device *dev)
>>>  {
>>>      struct lance_private *lp = dev->ml_priv;
>>>      int i;
>>> @@ -871,13 +871,12 @@ lance_init_ring(struct net_device *dev, gfp_t gfp)
>>>              struct sk_buff *skb;
>>>              void *rx_buff;
>>>
>>> -            skb = alloc_skb(PKT_BUF_SZ, GFP_DMA | gfp);
>>> +            skb = netdev_alloc_skb(dev, PKT_BUF_SZ);
>>>              lp->rx_skbuff[i] = skb;
>>> -            if (skb) {
>>> -                    skb->dev = dev;
>>> +            if (skb)
>>>                      rx_buff = skb->data;
>>> -            } else
>>> -                    rx_buff = kmalloc(PKT_BUF_SZ, GFP_DMA | gfp);
>>> +            else
>>> +                    rx_buff = kmalloc(PKT_BUF_SZ, GFP_DMA | GFP_AUTOMIC);
>>>              if (rx_buff == NULL)
>>>                      lp->rx_ring[i].base = 0;
>>>              else
>>
>> Thats really crap, please dont send us such patches, not even compiled.
>>
>> alloc_skb() has nothing to do with dev_alloc_skb(), and there is a
>> reason GFP_DMA is used in this driver.
>
> This is really terrible.
>
> Pradeep please stop sending these changes until you have your house
> in order.  Your patches are buggy and ill conceived.
>
> Please do not submit more patches in this area until you spend the
> necessary time to truly understand these interfaces and how these code
> snippets actually work.

Thanks for inputs!

Have submitted changes in total 118 files, and out of which changes in
this 1 single file is outcome of final minute changes. Apologies for
that!

Although, there are 4 other patches with trivial changes in total 114
files. You may want to consider them and probably want to discard
final i.e. 5th of 5 completely.

Anyways, have already resubmitted all patches again, reverting changes
pointed in here & correcting 5th patch.
--
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