Skip to content

Commit 0f6e876

Browse files
Wei Yongjundavem330
authored andcommitted
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 <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent e215701 commit 0f6e876

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/net/ethernet/arc/emac_main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -633,7 +633,7 @@ static int arc_emac_tx(struct sk_buff *skb, struct net_device *ndev)
633633
if (unlikely(dma_mapping_error(&ndev->dev, addr))) {
634634
stats->tx_dropped++;
635635
stats->tx_errors++;
636-
dev_kfree_skb(skb);
636+
dev_kfree_skb_any(skb);
637637
return NETDEV_TX_OK;
638638
}
639639
dma_unmap_addr_set(&priv->tx_buff[*txbd_curr], addr, addr);

0 commit comments

Comments
 (0)