Add missing pmap_update(pmap_kernel()); calls after pmap_kenter_pa and

pmap_remove.
This commit is contained in:
chris 2008-02-23 16:05:17 +00:00
parent 6711b9aec7
commit 2ff98bbc26
3 changed files with 11 additions and 6 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: kern_malloc_debug.c,v 1.18 2007/11/11 23:22:23 matt Exp $ */
/* $NetBSD: kern_malloc_debug.c,v 1.19 2008/02/23 16:05:17 chris Exp $ */
/*
* Copyright (c) 1999, 2000 Artur Grabowski <art@openbsd.org>
@ -56,7 +56,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: kern_malloc_debug.c,v 1.18 2007/11/11 23:22:23 matt Exp $");
__KERNEL_RCSID(0, "$NetBSD: kern_malloc_debug.c,v 1.19 2008/02/23 16:05:17 chris Exp $");
#include <sys/param.h>
#include <sys/proc.h>
@ -149,6 +149,7 @@ debug_malloc(unsigned long size, struct malloc_type *type, int flags,
splx(s);
pmap_kenter_pa(md->md_va, md->md_pa, VM_PROT_READ|VM_PROT_WRITE);
pmap_update(pmap_kernel());
md->md_size = size;
md->md_type = type;
@ -207,6 +208,7 @@ debug_free(void *addr, struct malloc_type *type)
* unmap the page.
*/
pmap_kremove(md->md_va, PAGE_SIZE);
pmap_update(pmap_kernel());
splx(s);
return (1);

View File

@ -1,4 +1,4 @@
/* $NetBSD: kern_verifiedexec.c,v 1.107 2008/01/15 18:51:43 ad Exp $ */
/* $NetBSD: kern_verifiedexec.c,v 1.108 2008/02/23 16:05:17 chris Exp $ */
/*-
* Copyright (c) 2005, 2006 Elad Efrat <elad@NetBSD.org>
@ -29,7 +29,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: kern_verifiedexec.c,v 1.107 2008/01/15 18:51:43 ad Exp $");
__KERNEL_RCSID(0, "$NetBSD: kern_verifiedexec.c,v 1.108 2008/02/23 16:05:17 chris Exp $");
#include "opt_veriexec.h"
@ -710,6 +710,7 @@ veriexec_page_verify(struct veriexec_file_entry *vfe, struct vm_page *pg,
fp = kmem_alloc(vfe->ops->hash_len, KM_SLEEP);
kva = uvm_km_alloc(kernel_map, PAGE_SIZE, 0, UVM_KMF_VAONLY | UVM_KMF_WAITVA);
pmap_kenter_pa(kva, VM_PAGE_TO_PHYS(pg), VM_PROT_READ);
pmap_update(pmap_kernel());
page_fp = (u_char *) vfe->page_fp + (vfe->ops->hash_len * idx);
(vfe->ops->init)(ctx);
@ -719,6 +720,7 @@ veriexec_page_verify(struct veriexec_file_entry *vfe, struct vm_page *pg,
(vfe->ops->final)(fp, ctx);
pmap_kremove(kva, PAGE_SIZE);
pmap_update(pmap_kernel());
uvm_km_free(kernel_map, kva, PAGE_SIZE, UVM_KMF_VAONLY);
error = veriexec_fp_cmp(vfe->ops, page_fp, fp);

View File

@ -1,4 +1,4 @@
/* $NetBSD: sys_pipe.c,v 1.95 2008/01/28 20:01:50 ad Exp $ */
/* $NetBSD: sys_pipe.c,v 1.96 2008/02/23 16:05:17 chris Exp $ */
/*-
* Copyright (c) 2003, 2007, 2008 The NetBSD Foundation, Inc.
@ -83,7 +83,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: sys_pipe.c,v 1.95 2008/01/28 20:01:50 ad Exp $");
__KERNEL_RCSID(0, "$NetBSD: sys_pipe.c,v 1.96 2008/02/23 16:05:17 chris Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -775,6 +775,7 @@ pipe_direct_write(struct file *fp, struct pipe *wpipe, struct uio *uio)
if (pgs != NULL) {
pmap_kremove(wpipe->pipe_map.kva, blen);
pmap_update(pmap_kernel());
uvm_unloan(pgs, npages, UVM_LOAN_TOPAGE);
}
if (error || amountpipekva > maxpipekva)