Problem with dev_kfree_skb_any() in 2.6.0

From: Benjamin Herrenschmidt
Date: Sat Dec 27 2003 - 18:19:01 EST


I'm getting Ooops reports with sungem. The problem is that in the PM
code (and possibly other exceptional code path), it will clean the rings
at non interrupt time but with a spinlock_irq held.

it uses dev_kfree_skb_any() which does:

static inline void dev_kfree_skb_any(struct sk_buff *skb)
{
if (in_irq())
dev_kfree_skb_irq(skb);
else
dev_kfree_skb(skb);
}

However, in_irq() seem to only catch real IRQ time, so I end up calling
dev_kfree_skb(), which triggers the following BUG() in local_bh_enable()
WARN_ON(irqs_disabled());

We should probably fix dev_kfree_skb_any() ? Still ugly imho though...

- if (in_irq())
+ if (in_irq() || irqs_disabled())


Ben.


-
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/