netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* need info: softirq warning upon free skb
@ 2013-03-14 18:36 Arend van Spriel
  0 siblings, 0 replies; only message in thread
From: Arend van Spriel @ 2013-03-14 18:36 UTC (permalink / raw)
  To: David S. Miller; +Cc: Eric Dumazet, netdev, linux-kernel, brcm80211-dev-list

Hi Dave,

Sorry to bother. Today during testing I ran into two warnings, which 
given their occurrence are fired in the same code path:
kernel/softirq.c:99:__local_bh_disable():
	WARN_ON_ONCE(in_irq());
kernel/softirq.c:160:_local_bh_enable_ip():
	WARN_ON_ONCE(in_irq() || irqs_disabled());

I have not seen those warning before, but consider them serious enough 
to look into it (although no crashing system yet). They popped up in our 
driver while freeing an skb. For this we use a utility function in our 
driver (brcm80211 wireless) as listed below. It provided a little code 
shortcut by skipping dev_kfree_skb_any(). However, circumstances seem to 
have changed for some reason. The warning occurs in 
nf_conntrack_destroy() path. Before digging deeper I decided the answer 
might be known out there. Should the comment statements in the code 
snippet below still be valid? I am more than happy to get rid of the 
function entirely if it does not make sense.

Regards,
Arend

-8<---------------------------------------------------------------
void brcmu_pkt_buf_free_skb(struct sk_buff *skb)
{
	if (!skb)
		return;
	WARN_ON(skb->next);
	if (skb->destructor)
		/* cannot kfree_skb() on hard IRQ (net/core/skbuff.c) if
		 * destructor exists
		 */
		dev_kfree_skb_any(skb);
	else
		/* can free immediately (even in_irq()) if destructor
		 * does not exist
		 */
		dev_kfree_skb(skb);
}

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2013-03-14 18:36 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-03-14 18:36 need info: softirq warning upon free skb Arend van Spriel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).