summaryrefslogtreecommitdiffstats
path: root/sys/vm
diff options
context:
space:
mode:
authoralc <alc@FreeBSD.org>2007-04-19 05:39:54 +0000
committeralc <alc@FreeBSD.org>2007-04-19 05:39:54 +0000
commita10280e050436a2493f47fad1138c3291eb81b18 (patch)
treec63e527158e8e74bf9d30f677fd210f735888d09 /sys/vm
parent6e14b3e802364a0e6b4386c8c50a8b47abf48441 (diff)
downloadFreeBSD-src-a10280e050436a2493f47fad1138c3291eb81b18.zip
FreeBSD-src-a10280e050436a2493f47fad1138c3291eb81b18.tar.gz
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
Diffstat (limited to 'sys/vm')
-rw-r--r--sys/vm/vm_contig.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/vm/vm_contig.c b/sys/vm/vm_contig.c
index 066b430..b26c46f 100644
--- a/sys/vm/vm_contig.c
+++ b/sys/vm/vm_contig.c
@@ -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;
}
OpenPOWER on IntegriCloud