From: Alexey Dobriyan Date: Thu, 5 Jun 2008 23:44:59 +0000 (-0500) Subject: atl1: fix 4G memory corruption bug X-Git-Tag: v2.6.25.6~12 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1965da94d854758b4beebfeadcfae480039cbb76;p=thirdparty%2Fkernel%2Fstable.git atl1: fix 4G memory corruption bug upstream commit: aefdbf1a3b832a580a50cf3d1dcbb717be7cbdbe 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 [jacliburn@bellsouth.net: backport to 2.6.25.4] Signed-off-by: Chris Wright --- diff --git a/drivers/net/atl1/atl1_main.c b/drivers/net/atl1/atl1_main.c index 129b8b3aa7731..68be4e1c69aed 100644 --- a/drivers/net/atl1/atl1_main.c +++ b/drivers/net/atl1/atl1_main.c @@ -1334,6 +1334,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);