Re: question on context of kfree_skb()

Muli Ben-Yehuda (mulix@mulix.org)
Tue, 31 Dec 2002 00:26:52 +0200


On Mon, Dec 30, 2002 at 07:32:15PM +0100, Oliver Neukum wrote:
> Hi,
>
> I am getting reports about kfree_skb being called in hard IRQ.
> Which context should it be called in?

kfree_skb() should be called when you are not in hard irq context
(i.e. in_irq() returns false). Same thing for dev_kfree_skb(), which
is a #define for kfree_skb(). Not in hard irq context means you are
either in softirq context (bottom half) or process context.

dev_kfree_skb_irq() should be called when you are in interrupt
context.

dev_kfree_skb_any() should be called when you could be either
executing in interrupt context or not.

-- 
Muli Ben-Yehuda

"The speed of light really is too slow nowdays." -- Alan Cox - 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/