提交 cf503e8f 编写于 作者: D Dhananjay Phadke 提交者: David S. Miller

netxen: fix infinite loop on dma mapping failure

Fix a perpetual while() loop in unwinding partial
mapped tx skb on dma mapping failure.
Reported-by: N"Juha Leppanen" <juha_motorsportcom@luukku.com>
Signed-off-by: NDhananjay Phadke <dhananjay@netxen.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 270e57e1
......@@ -1577,8 +1577,8 @@ netxen_map_tx_skb(struct pci_dev *pdev,
return 0;
unwind:
while (i > 0) {
nf = &pbuf->frag_array[i];
while (--i >= 0) {
nf = &pbuf->frag_array[i+1];
pci_unmap_page(pdev, nf->dma, nf->length, PCI_DMA_TODEVICE);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册