Skip to contentSkip to conversation

question on context of kfree_skb()

DISCUSSION Oliver Neukum 2 participants 2 messages Dec 30, 2002

lore
Share & tools
lore
#0 lore raw

Hi,

I am getting reports about kfree_skb being called in hard IRQ. Which context should it be called in?

Regards
Oliver

#1 lore raw
Quoted 4 lines · Oliver Neukum

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.

Signature · 3 lines
Muli Ben-Yehuda

"The speed of light really is too slow nowdays." -- Alan Cox