aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexey Dobriyan <adobriyan@gmail.com>2008-05-22 18:00:25 -0400
committerJeff Garzik <jgarzik@redhat.com>2008-05-30 22:07:25 -0400
commitaefdbf1a3b832a580a50cf3d1dcbb717be7cbdbe (patch)
tree8424a76c31a2d03204f58e2b155564ff8fbee953
parent08722bc4a066705e3f5fb4a5a87ce717fe9f896e (diff)
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 <adobriyan@gmail.com> Signed-off-by: Jay Cliburn <jacliburn@bellsouth.net> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
-rw-r--r--drivers/net/atlx/atl1.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/atlx/atl1.c b/drivers/net/atlx/atl1.c
index 9c2394d49428..79325c4fb544 100644
--- a/drivers/net/atlx/atl1.c
+++ b/drivers/net/atlx/atl1.c
@@ -2023,6 +2023,7 @@ rrd_ok:
2023 /* Good Receive */ 2023 /* Good Receive */
2024 pci_unmap_page(adapter->pdev, buffer_info->dma, 2024 pci_unmap_page(adapter->pdev, buffer_info->dma,
2025 buffer_info->length, PCI_DMA_FROMDEVICE); 2025 buffer_info->length, PCI_DMA_FROMDEVICE);
2026 buffer_info->dma = 0;
2026 skb = buffer_info->skb; 2027 skb = buffer_info->skb;
2027 length = le16_to_cpu(rrd->xsz.xsum_sz.pkt_size); 2028 length = le16_to_cpu(rrd->xsz.xsum_sz.pkt_size);
2028 2029