From: Francois Romieu Date: Tue, 26 Aug 2008 19:56:06 +0000 (+0200) Subject: r8169: balance pci_map / pci_unmap pair X-Git-Tag: v2.6.27-rc5~8^2~4^2~26 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a866bbf6aacf95f849810079442a20be118ce905;p=linux-2.6 r8169: balance pci_map / pci_unmap pair The leak hurts with swiotlb and jumbo frames. Fix http://bugzilla.kernel.org/show_bug.cgi?id=9468. Heavily hinted by Ilpo Järvinen . Signed-off-by: Francois Romieu Tested-by: Alistair John Strachan Tested-by: Timothy J Fontaine Cc: Edward Hsu Signed-off-by: Jeff Garzik --- diff --git a/drivers/net/r8169.c b/drivers/net/r8169.c index a3e3895e50..0f6f9747d2 100644 --- a/drivers/net/r8169.c +++ b/drivers/net/r8169.c @@ -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; }