Commit cf503e8f authored by Dhananjay Phadke's avatar Dhananjay Phadke Committed by 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: default avatar"Juha Leppanen" <juha_motorsportcom@luukku.com>
Signed-off-by: default avatarDhananjay Phadke <dhananjay@netxen.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 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%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment