Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 5 Jun 2019 13:08:21 +0000 (UTC)
From:      Tycho Nightingale <tychon@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r348687 - head/sys/x86/iommu
Message-ID:  <201906051308.x55D8Ltk014464@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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];
 		}



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201906051308.x55D8Ltk014464>