From: Muli Ben-Yehuda <mulix@mulix.org>
To: Emmanuel Guiton <emmanuel@netlab.hut.fi>
Cc: Duncan Sands <baldrick@free.fr>,
linux-kernel <linux-kernel@vger.kernel.org>
Subject: Re: Freeing skbuff (was: Re: Sending built-by-hand packet and kernel panic.)
Date: Tue, 3 Feb 2004 11:49:40 +0200 [thread overview]
Message-ID: <20040203094938.GE5212@actcom.co.il> (raw)
In-Reply-To: <401E8E33.7050305@netlab.hut.fi>
[-- Attachment #1: Type: text/plain, Size: 1400 bytes --]
On Mon, Feb 02, 2004 at 07:51:47PM +0200, Emmanuel Guiton wrote:
> However, my overall problem is not solved. As far as my investigations
> led me, my sk_buff structure is never released after having been sent on
> the wire. So I guess I need an explicit destructor function in my
> sk_buff as the following is present in the definition of struct sk_buff:
> void (*destructor)(struct sk_buff *); /* Destruct function */
Note that depending on what you're doing, you might not be able to use
the destructor, because the upper layers use it without regards to
whether it was set before. To the best of my understanding, the rules
for the destructor say that it is free for the use of whatever layer
owns the skbuff at the moment. There are three ways around it - the
first and obvious is to avoid relying on the destructor. The second is
that you can use skb_clone() to get your own copy of the headers and
the destructor (but that doesn't really help you because how does the
layer that ends up freeing the skb know to use your version of the
headers?) and the third is to use this patch,
http://www.mulix.org/patches/skb-destructor-chaining-A2-2.6.1, to
allow more than destructor per skb.
Hope this helps,
Muli
--
Muli Ben-Yehuda
http://www.mulix.org | http://mulix.livejournal.com/
"the nucleus of linux oscillates my world" - gccbot@#offtopic
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
next prev parent reply other threads:[~2004-02-03 10:01 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-02-02 14:46 Sending built-by-hand packet and kernel panic Emmanuel Guiton
[not found] ` <200402021602.56242.baldrick@free.fr>
2004-02-02 17:51 ` Freeing skbuff (was: Re: Sending built-by-hand packet and kernel panic.) Emmanuel Guiton
2004-02-03 9:49 ` Muli Ben-Yehuda [this message]
2004-02-06 6:58 ` Emmanuel Guiton
2004-02-04 10:27 ` Duncan Sands
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=20040203094938.GE5212@actcom.co.il \
--to=mulix@mulix.org \
--cc=baldrick@free.fr \
--cc=emmanuel@netlab.hut.fi \
--cc=linux-kernel@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