Skip to content

Commit

Permalink
virtio_net: Call dev_kfree_skb_any instead of dev_kfree_skb.
Browse files Browse the repository at this point in the history
Replace dev_kfree_skb with dev_kfree_skb_any in start_xmit which can
be called in hard irq and other contexts.

start_xmit only frees skbs that it is dropping.

Signed-off-by: "Eric W. Biederman" <[email protected]>
  • Loading branch information
ebiederm committed Mar 25, 2014
1 parent 8b6da5f commit 85e9452
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/virtio_net.c
Original file line number Diff line number Diff line change
Expand Up @@ -883,7 +883,7 @@ static netdev_tx_t start_xmit(struct sk_buff *skb, struct net_device *dev)
dev_warn(&dev->dev,
"Unexpected TXQ (%d) queue failure: %d\n", qnum, err);
dev->stats.tx_dropped++;
kfree_skb(skb);
dev_kfree_skb_any(skb);
return NETDEV_TX_OK;
}

Expand Down

0 comments on commit 85e9452

Please sign in to comment.