mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-16 16:54:20 +08:00
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>
This commit is contained in:
parent
270e57e133
commit
cf503e8f45
@ -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);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user