[patch 37/42] r8169: balance pci_map / pci_unmap pair

From: Greg KH
Date: Wed Sep 03 2008 - 13:46:27 EST


2.6.26-stable review patch. If anyone has any objections, please let us know.

------------------

From: Francois Romieu <romieu@xxxxxxxxxxxxx>

commit a866bbf6aacf95f849810079442a20be118ce905 upstream

The leak hurts with swiotlb and jumbo frames.

Fix http://bugzilla.kernel.org/show_bug.cgi?id=9468.

Heavily hinted by Ilpo Järvinen <ilpo.jarvinen@xxxxxxxxxxx>.

Signed-off-by: Francois Romieu <romieu@xxxxxxxxxxxxx>
Tested-by: Alistair John Strachan <alistair@xxxxxxxxxxxxx>
Tested-by: Timothy J Fontaine <tjfontaine@xxxxxxxxxxxxxxxxx>
Cc: Edward Hsu <edward_hsu@xxxxxxxxxxxxxx>
Signed-off-by: Jeff Garzik <jgarzik@xxxxxxxxxx>
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxx>

---
drivers/net/r8169.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

--- a/drivers/net/r8169.c
+++ b/drivers/net/r8169.c
@@ -2822,7 +2822,7 @@ static int rtl8169_rx_interrupt(struct n
pkt_size, PCI_DMA_FROMDEVICE);
rtl8169_mark_to_asic(desc, tp->rx_buf_sz);
} else {
- pci_unmap_single(pdev, addr, pkt_size,
+ pci_unmap_single(pdev, addr, tp->rx_buf_sz,
PCI_DMA_FROMDEVICE);
tp->Rx_skbuff[entry] = NULL;
}

--
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/