From: Jarek Poplawski <jarkao2@gmail.com>
To: Octavian Purdila <opurdila@ixiacom.com>
Cc: Evgeniy Polyakov <johnpol@2ka.mipt.ru>,
Ben Hutchings <bhutchings@solarflare.com>,
netdev@vger.kernel.org, davem@davemloft.net
Subject: Re: race in skb_splice_bits?
Date: Wed, 28 May 2008 22:16:59 +0200 [thread overview]
Message-ID: <20080528201659.GA2696@ami.dom.local> (raw)
In-Reply-To: <200805282309.13628.opurdila@ixiacom.com>
On Wed, May 28, 2008 at 11:09:13PM +0300, Octavian Purdila wrote:
> On Wednesday 28 May 2008, Jarek Poplawski wrote:
>
> > >> We queue data under the lock and clone appropriate skb (and then grab it
> > >> multiple times), so even it will be dropped, its data will not freed,
> > >> and thus we will be able to read it. Or you are talking about different
> > >> skbs?
> > >
> > > You are right, I forgot about the clone.
> >
> > Probably I miss something, but how does it help when tcp_collapse()
> > uses __kfree_skb()?
> >
>
> __kfree_skb() -> skb_release_all() -> skb_release_data():
>
> static void skb_release_data(struct sk_buff *skb)
> {
> if (!skb->cloned ||
> <snip>
> kfree(skb->head);
>
> Since we clone the skb in skb_splice_bits() the skb's data will only be freed
> when the last clone is deleted.
Right!
Thanks for explanation,
Jarek P.
prev parent reply other threads:[~2008-05-28 20:17 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-05-27 0:25 race in skb_splice_bits? Octavian Purdila
2008-05-27 2:08 ` Ben Hutchings
2008-05-27 10:41 ` Octavian Purdila
2008-05-27 11:01 ` Evgeniy Polyakov
2008-05-27 11:08 ` Ben Hutchings
2008-05-27 11:52 ` Evgeniy Polyakov
2008-05-27 11:56 ` Evgeniy Polyakov
2008-05-27 12:53 ` Octavian Purdila
2008-05-27 13:21 ` Evgeniy Polyakov
2008-05-27 14:03 ` Evgeniy Polyakov
2008-05-27 14:39 ` Octavian Purdila
2008-05-27 15:09 ` Evgeniy Polyakov
2008-05-27 15:12 ` Evgeniy Polyakov
2008-05-27 15:22 ` Evgeniy Polyakov
2008-05-27 15:33 ` Octavian Purdila
2008-05-27 15:47 ` Evgeniy Polyakov
2008-05-27 17:28 ` Evgeniy Polyakov
2008-05-27 23:59 ` Octavian Purdila
2008-05-28 8:52 ` Evgeniy Polyakov
2008-05-28 13:20 ` Octavian Purdila
2008-05-28 14:11 ` Evgeniy Polyakov
2008-05-28 15:20 ` Octavian Purdila
2008-05-28 15:42 ` Evgeniy Polyakov
2008-05-28 17:08 ` Octavian Purdila
2008-05-28 17:51 ` Evgeniy Polyakov
2008-05-28 18:02 ` Octavian Purdila
2008-05-28 20:01 ` Jarek Poplawski
2008-05-28 20:09 ` Octavian Purdila
2008-05-28 20:16 ` Jarek Poplawski [this message]
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=20080528201659.GA2696@ami.dom.local \
--to=jarkao2@gmail.com \
--cc=bhutchings@solarflare.com \
--cc=davem@davemloft.net \
--cc=johnpol@2ka.mipt.ru \
--cc=netdev@vger.kernel.org \
--cc=opurdila@ixiacom.com \
/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).