]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
macb: Call dev_kfree_skb_any instead of kfree_skb.
authorEric W. Biederman <ebiederm@xmission.com>
Sat, 15 Mar 2014 23:08:27 +0000 (16:08 -0700)
committerEric W. Biederman <ebiederm@xmission.com>
Tue, 25 Mar 2014 04:18:55 +0000 (21:18 -0700)
Replace kfree_skb with dev_kfree_skb_any in macb_start_xmit that can
be called in hard irq and other contexts.

macb_start_xmit only frees skbs when dropping them so
dev_kfree_skb_any is used.

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

index d0c38e01e99fdc70e802b33dc977e081d1a72f5c..6116887d2880b6d8b725d4fa8f318d91bc74cb06 100644 (file)
@@ -1045,7 +1045,7 @@ static int macb_start_xmit(struct sk_buff *skb, struct net_device *dev)
        mapping = dma_map_single(&bp->pdev->dev, skb->data,
                                 len, DMA_TO_DEVICE);
        if (dma_mapping_error(&bp->pdev->dev, mapping)) {
-               kfree_skb(skb);
+               dev_kfree_skb_any(skb);
                goto unlock;
        }