summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/arc
diff options
context:
space:
mode:
authorWei Yongjun <weiyongjun1@huawei.com>2016-10-19 16:47:52 +0300
committerDavid S. Miller <davem@davemloft.net>2016-10-19 22:16:24 +0300
commit0f6e87613c3234c6350aaa971bd9434d29405302 (patch)
treecbf0d067bd71808b9b7c088f141eda6bfaf0a481 /drivers/net/ethernet/arc
parente215701f2d1c521b2efee7cc35ef9097f80e4abe (diff)
downloadlinux-0f6e87613c3234c6350aaa971bd9434d29405302.tar.xz
net: arc_emac: use dev_kfree_skb_any instead of dev_kfree_skb
Replace dev_kfree_skb with dev_kfree_skb_any in arc_emac_tx() which can be called from hard irq context (netpoll) and from other contexts. arc_emac_tx() only frees skbs that it has dropped. This is detected by Coccinelle semantic patch. Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/arc')
-rw-r--r--drivers/net/ethernet/arc/emac_main.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/arc/emac_main.c b/drivers/net/ethernet/arc/emac_main.c
index b0da9693f28a..95d8b3ea7bc3 100644
--- a/drivers/net/ethernet/arc/emac_main.c
+++ b/drivers/net/ethernet/arc/emac_main.c
@@ -633,7 +633,7 @@ static int arc_emac_tx(struct sk_buff *skb, struct net_device *ndev)
if (unlikely(dma_mapping_error(&ndev->dev, addr))) {
stats->tx_dropped++;
stats->tx_errors++;
- dev_kfree_skb(skb);
+ dev_kfree_skb_any(skb);
return NETDEV_TX_OK;
}
dma_unmap_addr_set(&priv->tx_buff[*txbd_curr], addr, addr);