Messages in this thread |  | | | Date | Mon, 29 Dec 2003 19:24:02 +0200 | | From | Muli Ben-Yehuda <> | | Subject | Re: network driver that uses skb destructor |
| |
On Mon, Dec 29, 2003 at 06:53:59PM +0200, Sirotkin, Alexander wrote:
> Anybody tried to implement similar approach ? > Any thoughts why this would (or would not) work ?
It's a nice idea in theory, but the reality is that as the code currently stands, the upper layers 'hijack' the skb->destructor without regards to whether it was set previously, causing your memory to leak. See skb_set_owner_w(), skb_set_owner_r().
I wrote a patch to allow chaining of skb destructors, which was fairly simple and would allow both the driver and the upper layers to set their destructors. If there's any interet, I could probably resurrect it.
Cheers, Muli -- Muli Ben-Yehuda http://www.mulix.org | http://mulix.livejournal.com/ "the nucleus of linux oscillates my world" - gccbot@#offtopic
[unhandled content-type:application/pgp-signature] |  |