From a10280e050436a2493f47fad1138c3291eb81b18 Mon Sep 17 00:00:00 2001 From: alc Date: Thu, 19 Apr 2007 05:39:54 +0000 Subject: 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 --- sys/vm/vm_contig.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sys/vm') 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; } -- cgit v1.1