vxge: Call dev_kfree_skb_any instead of dev_kfree_skb.
authorEric W. Biederman <ebiederm@xmission.com>
Sun, 16 Mar 2014 00:51:57 +0000 (17:51 -0700)
committerEric W. Biederman <ebiederm@xmission.com>
Tue, 25 Mar 2014 04:19:07 +0000 (21:19 -0700)
Replace dev_kfree_skb with dev_kfree_skb_any in vxge_xmit that can
be called in hard irq and other contexts.

vxge_xmit only calls dev_kfree_skb_any when errors result in dropping
skbs.

Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
drivers/net/ethernet/neterion/vxge/vxge-main.c

index 11adc89959c18838b78bf9602a962018c312751a..d107bcbb8543035110a98a82a21a7e72c8ec1303 100644 (file)
@@ -824,7 +824,7 @@ vxge_xmit(struct sk_buff *skb, struct net_device *dev)
        if (unlikely(skb->len <= 0)) {
                vxge_debug_tx(VXGE_ERR,
                        "%s: Buffer has no data..", dev->name);
-               dev_kfree_skb(skb);
+               dev_kfree_skb_any(skb);
                return NETDEV_TX_OK;
        }
 
@@ -833,7 +833,7 @@ vxge_xmit(struct sk_buff *skb, struct net_device *dev)
        if (unlikely(!is_vxge_card_up(vdev))) {
                vxge_debug_tx(VXGE_ERR,
                        "%s: vdev not initialized", dev->name);
-               dev_kfree_skb(skb);
+               dev_kfree_skb_any(skb);
                return NETDEV_TX_OK;
        }
 
@@ -843,7 +843,7 @@ vxge_xmit(struct sk_buff *skb, struct net_device *dev)
                        vxge_debug_tx(VXGE_ERR,
                                "%s: Failed to store the mac address",
                                dev->name);
-                       dev_kfree_skb(skb);
+                       dev_kfree_skb_any(skb);
                        return NETDEV_TX_OK;
                }
        }
@@ -990,7 +990,7 @@ _exit1:
        vxge_hw_fifo_txdl_free(fifo_hw, dtr);
 _exit0:
        netif_tx_stop_queue(fifo->txq);
-       dev_kfree_skb(skb);
+       dev_kfree_skb_any(skb);
 
        return NETDEV_TX_OK;
 }