r8169: balance pci_map / pci_unmap pair
authorFrancois Romieu <[email protected]>
Tue, 26 Aug 2008 19:56:06 +0000 (21:56 +0200)
committerJeff Garzik <[email protected]>
Wed, 27 Aug 2008 09:16:24 +0000 (05:16 -0400)
The leak hurts with swiotlb and jumbo frames.

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

Heavily hinted by Ilpo Järvinen <[email protected]>.

Signed-off-by: Francois Romieu <[email protected]>
Tested-by: Alistair John Strachan <[email protected]>
Tested-by: Timothy J Fontaine <[email protected]>
Cc: Edward Hsu <[email protected]>
Signed-off-by: Jeff Garzik <[email protected]>
drivers/net/r8169.c

index a3e3895e503238af8988bfb32bfe53c26a934ce5..0f6f9747d255f08065570a108b28db7f33e33bb6 100644 (file)
@@ -2792,7 +2792,7 @@ static int rtl8169_rx_interrupt(struct net_device *dev,
                                        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;
                        }