From: Alexey Dobriyan Date: Thu, 22 May 2008 22:00:25 +0000 (+0400) Subject: atl1: fix 4G memory corruption bug X-Git-Tag: v2.6.26-rc5~1^2~16^2~1 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=aefdbf1a3b832a580a50cf3d1dcbb717be7cbdbe;p=linux-2.6-omap-h63xx.git atl1: fix 4G memory corruption bug When using 4+ GB RAM and SWIOTLB is active, the driver corrupts memory by writing an skb after the relevant DMA page has been unmapped. Although this doesn't happen when *not* using bounce buffers, clearing the pointer to the DMA page after unmapping it fixes the problem. http://marc.info/?t=120861317000005&r=2&w=2 Signed-off-by: Alexey Dobriyan Signed-off-by: Jay Cliburn Signed-off-by: Jeff Garzik --- diff --git a/drivers/net/atlx/atl1.c b/drivers/net/atlx/atl1.c index 9c2394d4942..79325c4fb54 100644 --- a/drivers/net/atlx/atl1.c +++ b/drivers/net/atlx/atl1.c @@ -2023,6 +2023,7 @@ rrd_ok: /* Good Receive */ pci_unmap_page(adapter->pdev, buffer_info->dma, buffer_info->length, PCI_DMA_FROMDEVICE); + buffer_info->dma = 0; skb = buffer_info->skb; length = le16_to_cpu(rrd->xsz.xsum_sz.pkt_size);