Re: "Badness in local_bh_enable" - a reasonable fix?

From: Stephen Hemminger
Date: Wed Oct 26 2005 - 15:47:38 EST


On Wed, 26 Oct 2005 15:34:38 -0400
Steve Snyder <R00020C@xxxxxxxxxxxxx> wrote:

> [ I observed the following on a Fedora Core 3 system, running kernel
> 2.6.12-1.1380_FC3. I am posting this here because a quick Googling
> indicates that the problem is not specific to this environment. ]
>
> Today I found my system log filled with the error shown below.
> Reading a 366MB file across a NFS mount results in over 6300
> occurrences of the error being written to the system log of the NFS
> server.
>
> I have 2 network interfaces in the NFS server machine, a standard
> kernel Ethernet device driver and my own Ultra-Wide Band (UWB) device
> driver. (In the error shown below the references to "fsuwbpci" are my
> driver.) This problem is not seen when using the Ethernet interface,
> but is perfectly consistent when reading a NFS-mounted file across the
> UWB interface. Therefore there is a problem with my code.
>
> I quickly established that the error came from within this routine:
>
> void netdev_tx_ack(struct net_device *dev, struct sk_buff *skb)
> {
> struct netdev_priv *priv = (struct netdev_priv *) dev->priv;
>
> priv->stats.tx_packets++;
> priv->stats.tx_bytes += skb->len;
>
> netdev_resume(dev);
> dev_kfree_skb(skb);
> }

Your driver is calling dev_kfree_skb with interrupts disabled.
Call dev_kfree_skb_any instead.

--
Stephen Hemminger <shemminger@xxxxxxxx>
OSDL http://developer.osdl.org/~shemminger
-
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/