aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorDhananjay Phadke <dhananjay@netxen.com>2009-09-03 09:10:55 -0400
committerDavid S. Miller <davem@davemloft.net>2009-09-03 23:02:04 -0400
commitcf503e8f458cec455b18d3938b3b27de6db3105e (patch)
tree1a74f7741be82cd6ded3371ee794f80f749e1a86 /drivers
parent270e57e133a9e61c8c62ea4a0d1ffdf53f91caf1 (diff)
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: "Juha Leppanen" <juha_motorsportcom@luukku.com> Signed-off-by: Dhananjay Phadke <dhananjay@netxen.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/netxen/netxen_nic_main.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/netxen/netxen_nic_main.c b/drivers/net/netxen/netxen_nic_main.c
index 53d57dc4d644..41b29671fc9a 100644
--- a/drivers/net/netxen/netxen_nic_main.c
+++ b/drivers/net/netxen/netxen_nic_main.c
@@ -1577,8 +1577,8 @@ netxen_map_tx_skb(struct pci_dev *pdev,
1577 return 0; 1577 return 0;
1578 1578
1579unwind: 1579unwind:
1580 while (i > 0) { 1580 while (--i >= 0) {
1581 nf = &pbuf->frag_array[i]; 1581 nf = &pbuf->frag_array[i+1];
1582 pci_unmap_page(pdev, nf->dma, nf->length, PCI_DMA_TODEVICE); 1582 pci_unmap_page(pdev, nf->dma, nf->length, PCI_DMA_TODEVICE);
1583 } 1583 }
1584 1584