Subject: Re: [PATCH] net: add destructor for skb data.

From: Rusty Russell <[email-masked]>
Date: Sun, 6 Apr 2008 13:20:59 +1000

On Saturday 05 April 2008 23:06:48 Evgeniy Polyakov wrote:
> Hi.
>
> On Sat, Apr 05, 2008 at 09:56:05PM +1000, Rusty Russell 
([email-masked]) 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.