1
0
mirror of https://git.FreeBSD.org/src.git synced 2025-01-21 15:45:02 +00:00

Correct contigmalloc2()'s implementation of M_ZERO. Specifically,

contigmalloc2() was always testing the first physical page for PG_ZERO,
not the current page of interest.

Submitted by: Michael Plass
PR: 81301
MFC after: 1 week
This commit is contained in:
Alan Cox 2007-04-19 05:39:54 +00:00
parent a96d395ba1
commit f40fd96d5b
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=168852

View File

@ -557,7 +557,7 @@ contigmalloc2(vm_page_t m, vm_pindex_t npages, int flags)
for (i = 0; i < npages; i++) {
vm_page_insert(&m[i], object,
OFF_TO_IDX(tmp_addr - VM_MIN_KERNEL_ADDRESS));
if ((flags & M_ZERO) && !(m->flags & PG_ZERO))
if ((flags & M_ZERO) && !(m[i].flags & PG_ZERO))
pmap_zero_page(&m[i]);
tmp_addr += PAGE_SIZE;
}