Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/uvm uvm_kmapent_free: add missing vm_map_lock/unlock.



details:   https://anonhg.NetBSD.org/src/rev/a4a6114e7f13
branches:  trunk
changeset: 581062:a4a6114e7f13
user:      yamt <yamt%NetBSD.org@localhost>
date:      Sun May 22 21:37:56 2005 +0000

description:
uvm_kmapent_free: add missing vm_map_lock/unlock.

diffstat:

 sys/uvm/uvm_map.c |  6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diffs (34 lines):

diff -r 994ca0b6f62d -r a4a6114e7f13 sys/uvm/uvm_map.c
--- a/sys/uvm/uvm_map.c Sun May 22 20:17:09 2005 +0000
+++ b/sys/uvm/uvm_map.c Sun May 22 21:37:56 2005 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: uvm_map.c,v 1.197 2005/05/18 01:36:16 yamt Exp $       */
+/*     $NetBSD: uvm_map.c,v 1.198 2005/05/22 21:37:56 yamt Exp $       */
 
 /*
  * Copyright (c) 1997 Charles D. Cranor and Washington University.
@@ -71,7 +71,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: uvm_map.c,v 1.197 2005/05/18 01:36:16 yamt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uvm_map.c,v 1.198 2005/05/22 21:37:56 yamt Exp $");
 
 #include "opt_ddb.h"
 #include "opt_uvmhist.h"
@@ -4291,6 +4291,7 @@
 
        va = (vaddr_t)ukh;
        KASSERT((va & PAGE_MASK) == 0);
+       vm_map_lock(map);
        uvm_unmap_remove(map, va, va + PAGE_SIZE, &deadentry, NULL, 0);
        KASSERT(deadentry->flags & UVM_MAP_KERNEL);
        KASSERT(deadentry->flags & UVM_MAP_KMAPENT);
@@ -4306,6 +4307,7 @@
        if (!pmap_extract(pmap, va, &pa))
                panic("%s: no mapping", __func__);
        pmap_kremove(va, PAGE_SIZE);
+       vm_map_unlock(map);
        pg = PHYS_TO_VM_PAGE(pa);
        uvm_pagefree(pg);
        ukh_free++;



Home | Main Index | Thread Index | Old Index