netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Govindarajulu Varadarajan <govindarajulu90@gmail.com>
To: Eric Dumazet <eric.dumazet@gmail.com>
Cc: Govindarajulu Varadarajan <govindarajulu90@gmail.com>,
	davem@davemloft.net, netdev@vger.kernel.org
Subject: Re: [PATCH net-next] net: sk_buff: memset(skb,0) after alloc in skb_clone
Date: Thu, 12 Sep 2013 11:51:18 +0530 (IST)	[thread overview]
Message-ID: <alpine.LNX.2.03.1309121149320.1735@gmail.com> (raw)
In-Reply-To: <1378816832.26319.75.camel@edumazet-glaptop>



On Tue, 10 Sep 2013, Eric Dumazet wrote:

> On Tue, 2013-09-10 at 10:18 +0530, Govindarajulu Varadarajan wrote:
>> The following patch memset the skb to 0 after alloc. We do this in
>> __alloc_skb_head, __alloc_skb, build_skb. We are missing this in
>> skb_clone.
>>
>> The following call to __skb_clone in skb_clone does not copy all the
>> members of sk_buff. If we donot clear the skb to 0, we will have some
>> uninitialized members in new skb.
>
> Which ones exactly ?
>
> I would rather make sure all fields are properly copied.
>
> Your patch is incomplete, because it doesn't handle the fast clone case.

Sorry, my bad. Didnt check the __copy_skb_header completely.

thanks
//govind

  reply	other threads:[~2013-09-12  6:21 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-10  4:48 [PATCH net-next] net: sk_buff: memset(skb,0) after alloc in skb_clone Govindarajulu Varadarajan
2013-09-10 12:40 ` Eric Dumazet
2013-09-12  6:21   ` Govindarajulu Varadarajan [this message]
  -- strict thread matches above, loose matches on Subject: below --
2013-09-10  6:33 Erik Hugne

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=alpine.LNX.2.03.1309121149320.1735@gmail.com \
    --to=govindarajulu90@gmail.com \
    --cc=davem@davemloft.net \
    --cc=eric.dumazet@gmail.com \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).