mirror of https://gitee.com/openkylin/linux.git
spider_net: Call dev_consume_skb_any instead of dev_kfree_skb.
Replace dev_kfree_skb with dev_consume_skb_any in spider_net_release_tx_chain which can be called in hard irq and other contexts. dev_consume_skb_any was choosen as it preserves the current dev_kfree_skb semantics (dev_kfree_skb is consume_skb) and is because it is correct most of the time as most packets will have been successfully transmitted not dropeed. Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
This commit is contained in:
parent
66d1bee1f3
commit
20eca054e9
|
@ -860,7 +860,7 @@ spider_net_release_tx_chain(struct spider_net_card *card, int brutal)
|
||||||
if (skb) {
|
if (skb) {
|
||||||
pci_unmap_single(card->pdev, buf_addr, skb->len,
|
pci_unmap_single(card->pdev, buf_addr, skb->len,
|
||||||
PCI_DMA_TODEVICE);
|
PCI_DMA_TODEVICE);
|
||||||
dev_kfree_skb(skb);
|
dev_consume_skb_any(skb);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
|
|
Loading…
Reference in New Issue