lkml.org 
[lkml]   [2003]   [Dec]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: Problem with dev_kfree_skb_any() in 2.6.0
From
Date
On Sun, 2003-12-28 at 12:07, David S. Miller wrote:
> On Sun, 28 Dec 2003 10:17:34 +1100
> Benjamin Herrenschmidt <benh@kernel.crashing.org> wrote:
>
> > We should probably fix dev_kfree_skb_any() ? Still ugly imho though...
> >
> > - if (in_irq())
> > + if (in_irq() || irqs_disabled())
> >
>
> That's not the right fix, the sungem PM code path TX queue
> packet freeing should be instead done outside of IRQ spinlocks.
>
> .../...

The "workaround" is a bit complicated, but I'll look into it,
I could probably get the whole clean ring thing out of the
spinlock instead (I need to reduce time spent in those locks
anyway).

Though it's really inconsistent imho, to have that routine that
can be called at task time, interrupt time, but not task time with
a spinlock held... especially since it's called *kfree*, I would
have expected kfree-like semantics...

Note that among the drivers broken with that same bug (typically
in the close() path) are :

- sunhme
- b44
- tg3
- ...

Almost all drivers calling dev_kfree_skb_any() do that within a
spinlock_irq ...

Ben.


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:59    [W:0.035 / U:0.380 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site