Commit b343941e authored by Eric W. Biederman's avatar Eric W. Biederman Committed by Kamal Mostafa

bnx2: Call dev_kfree_skby_any instead of dev_kfree_skb.

commit f458b2ee upstream.

Replace dev_kfree_skb with dev_kfree_skb_any in functions that can
be called in hard irq and other contexts.
Signed-off-by: default avatar"Eric W. Biederman" <ebiederm@xmission.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
Signed-off-by: default avatarKamal Mostafa <kamal@canonical.com>
parent 6ac527d9
...@@ -2869,7 +2869,7 @@ bnx2_tx_int(struct bnx2 *bp, struct bnx2_napi *bnapi, int budget) ...@@ -2869,7 +2869,7 @@ bnx2_tx_int(struct bnx2 *bp, struct bnx2_napi *bnapi, int budget)
sw_cons = BNX2_NEXT_TX_BD(sw_cons); sw_cons = BNX2_NEXT_TX_BD(sw_cons);
tx_bytes += skb->len; tx_bytes += skb->len;
dev_kfree_skb(skb); dev_kfree_skb_any(skb);
tx_pkt++; tx_pkt++;
if (tx_pkt == budget) if (tx_pkt == budget)
break; break;
...@@ -6622,7 +6622,7 @@ bnx2_start_xmit(struct sk_buff *skb, struct net_device *dev) ...@@ -6622,7 +6622,7 @@ bnx2_start_xmit(struct sk_buff *skb, struct net_device *dev)
mapping = dma_map_single(&bp->pdev->dev, skb->data, len, PCI_DMA_TODEVICE); mapping = dma_map_single(&bp->pdev->dev, skb->data, len, PCI_DMA_TODEVICE);
if (dma_mapping_error(&bp->pdev->dev, mapping)) { if (dma_mapping_error(&bp->pdev->dev, mapping)) {
dev_kfree_skb(skb); dev_kfree_skb_any(skb);
return NETDEV_TX_OK; return NETDEV_TX_OK;
} }
...@@ -6715,7 +6715,7 @@ bnx2_start_xmit(struct sk_buff *skb, struct net_device *dev) ...@@ -6715,7 +6715,7 @@ bnx2_start_xmit(struct sk_buff *skb, struct net_device *dev)
PCI_DMA_TODEVICE); PCI_DMA_TODEVICE);
} }
dev_kfree_skb(skb); dev_kfree_skb_any(skb);
return NETDEV_TX_OK; return NETDEV_TX_OK;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment