lkml.org 
[lkml]   [2003]   [Dec]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
DateMon, 29 Dec 2003 19:24:02 +0200
FromMuli Ben-Yehuda <>
SubjectRe: 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]
\
 
 \ /
  Last update: 2005-03-22 13:59    [from the cache]
©2003-2010