[<prev] [next>] [day] [month] [year] [list]
Message-ID: <51421896.6020607@broadcom.com>
Date: Thu, 14 Mar 2013 19:36:06 +0100
From: "Arend van Spriel" <arend@...adcom.com>
To: "David S. Miller" <davem@...emloft.net>
cc: "Eric Dumazet" <edumazet@...gle.com>, netdev@...r.kernel.org,
linux-kernel@...r.kernel.org, brcm80211-dev-list@...adcom.com
Subject: need 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);
}
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists