Re: Problem with dev_kfree_skb_any() in 2.6.0

From: David S. Miller
Date: Sat Dec 27 2003 - 20:11:08 EST


On Sun, 28 Dec 2003 10:17:34 +1100
Benjamin Herrenschmidt <benh@xxxxxxxxxxxxxxxxxxx> 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 easiest and safest way to do this is to have a local stack
SKB list whose pointer gets passed down into the chip reset and
thus the TX queue liberation code, the TX queue liberation code
works inside the lock but does not actually free the SKBs, instead
it tacks the SKBs onto the SKB list, then at the top level when the
IRQ lock is released the SKBs on the list are actually freed.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/