netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Rusty Russell <rusty@rustcorp.com.au>
To: Evgeniy Polyakov <johnpol@2ka.mipt.ru>
Cc: David Miller <davem@davemloft.net>, netdev@vger.kernel.org
Subject: Re: [PATCH] net: add destructor for skb data.
Date: Sun, 6 Apr 2008 13:20:59 +1000	[thread overview]
Message-ID: <200804061320.59485.rusty@rustcorp.com.au> (raw)
In-Reply-To: <20080405130647.GA21337@2ka.mipt.ru>

On Saturday 05 April 2008 23:06:48 Evgeniy Polyakov wrote:
> Hi.
>
> On Sat, Apr 05, 2008 at 09:56:05PM +1000, Rusty Russell 
(rusty@rustcorp.com.au) wrote:
> > If we want to notify something when an skb is truly finished (such as
> > for tun vringfd support), we need a destructor on the data.  We don't
> > need to add other fields, since we can just allocate extra room at the
> > end.
>
> There is skb->destructor already, for your case of vringfd it can be
> used safely afaics.

Hi Evgeniy,

    I don't think so.  For a start, the skb destructor is called while the skb 
is still in the socket queue (ie. the data is still live).  Secondly, the 
original skb can be freed while clones still reference the data.

Cheers,
Rusty.

  reply	other threads:[~2008-04-06  3:21 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-04-05 11:56 [PATCH] net: add destructor for skb data Rusty Russell
2008-04-05 13:06 ` Evgeniy Polyakov
2008-04-06  3:20   ` Rusty Russell [this message]
2008-04-06  9:20     ` Evgeniy Polyakov
2008-04-06 13:32       ` Evgeniy Polyakov
2008-04-06 21:10       ` Rusty Russell

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=200804061320.59485.rusty@rustcorp.com.au \
    --to=rusty@rustcorp.com.au \
    --cc=davem@davemloft.net \
    --cc=johnpol@2ka.mipt.ru \
    --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).