lkml.org 
[lkml]   [2013]   [Mar]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
Subjectneed info: softirq warning upon free skb
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);
}



\
 
 \ /
  Last update: 2013-03-14 20:43    [W:0.035 / U:0.052 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site