* [PATCH] atl1: fix 4G memory corruption bug
@ 2008-05-14 0:50 Jay Cliburn
0 siblings, 0 replies; only message in thread
From: Jay Cliburn @ 2008-05-14 0:50 UTC (permalink / raw)
To: jeff; +Cc: adobriyan, csnook, netdev, linux-kernel, Jay Cliburn
From: Alexey Dobriyan <adobriyan@gmail.com>
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.
Signed-off-by: Jay Cliburn <jacliburn@bellsouth.net>
---
drivers/net/atlx/atl1.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/drivers/net/atlx/atl1.c b/drivers/net/atlx/atl1.c
index 0afe522..e67b154 100644
--- a/drivers/net/atlx/atl1.c
+++ b/drivers/net/atlx/atl1.c
@@ -2027,6 +2027,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);
--
1.5.4.1
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2008-05-14 0:56 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-05-14 0:50 [PATCH] atl1: fix 4G memory corruption bug Jay Cliburn
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).