svn commit: r348687 - head/sys/x86/iommu
Tycho Nightingale
tychon at FreeBSD.org
Wed Jun 5 13:08:22 UTC 2019
Author: tychon
Date: Wed Jun 5 13:08:21 2019
New Revision: 348687
URL: https://svnweb.freebsd.org/changeset/base/348687
Log:
another occurrence where a very large dma mapping can cause integer overflow
Submitted by: rlibby
Sponsored by: Dell EMC Isilon
Modified:
head/sys/x86/iommu/busdma_dmar.c
Modified: head/sys/x86/iommu/busdma_dmar.c
==============================================================================
--- head/sys/x86/iommu/busdma_dmar.c Wed Jun 5 12:53:36 2019 (r348686)
+++ head/sys/x86/iommu/busdma_dmar.c Wed Jun 5 13:08:21 2019 (r348687)
@@ -702,7 +702,7 @@ dmar_bus_dmamap_load_phys(bus_dma_tag_t dmat, bus_dmam
return (ENOMEM);
}
}
- vm_page_initfake(&fma[i], pstart + i * PAGE_SIZE,
+ vm_page_initfake(&fma[i], pstart + ptoa(i),
VM_MEMATTR_DEFAULT);
ma[i] = &fma[i];
}
More information about the svn-src-head
mailing list