diff options
author | alc <alc@FreeBSD.org> | 2007-04-19 05:39:54 +0000 |
---|---|---|
committer | alc <alc@FreeBSD.org> | 2007-04-19 05:39:54 +0000 |
commit | a10280e050436a2493f47fad1138c3291eb81b18 (patch) | |
tree | c63e527158e8e74bf9d30f677fd210f735888d09 | |
parent | 6e14b3e802364a0e6b4386c8c50a8b47abf48441 (diff) | |
download | FreeBSD-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
-rw-r--r-- | sys/vm/vm_contig.c | 2 |
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; } |