Source-Changes-HG archive

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

[src/netbsd-1-5]: src/sys/uvm Pull up revision 1.44 (requested by thorpej):



details:   https://anonhg.NetBSD.org/src/rev/200a8e04d431
branches:  netbsd-1-5
changeset: 491317:200a8e04d431
user:      he <he%NetBSD.org@localhost>
date:      Mon Apr 23 21:32:05 2001 +0000

description:
Pull up revision 1.44 (requested by thorpej):
  Use correct size for uvm_unmap() in error case of uvm_km_kmemalloc().

diffstat:

 sys/uvm/uvm_km.c |  8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

diffs (36 lines):

diff -r 33df7c9e05a7 -r 200a8e04d431 sys/uvm/uvm_km.c
--- a/sys/uvm/uvm_km.c  Sun Apr 22 18:40:54 2001 +0000
+++ b/sys/uvm/uvm_km.c  Mon Apr 23 21:32:05 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: uvm_km.c,v 1.35 2000/05/08 23:10:20 thorpej Exp $      */
+/*     $NetBSD: uvm_km.c,v 1.35.4.1 2001/04/23 21:32:05 he Exp $       */
 
 /* 
  * Copyright (c) 1997 Charles D. Cranor and Washington University.
@@ -520,6 +520,7 @@
 {
        vaddr_t kva, loopva;
        vaddr_t offset;
+       vsize_t loopsize;
        struct vm_page *pg;
        UVMHIST_FUNC("uvm_km_kmemalloc"); UVMHIST_CALLED(maphist);
 
@@ -572,7 +573,8 @@
         */
 
        loopva = kva;
-       while (size) {
+       loopsize = size;
+       while (loopsize) {
                simple_lock(&obj->vmobjlock);
                pg = uvm_pagealloc(obj, offset, NULL, 0);
                if (pg) {
@@ -612,7 +614,7 @@
                }
                loopva += PAGE_SIZE;
                offset += PAGE_SIZE;
-               size -= PAGE_SIZE;
+               loopsize -= PAGE_SIZE;
        }
 
        UVMHIST_LOG(maphist,"<- done (kva=0x%x)", kva,0,0,0);



Home | Main Index | Thread Index | Old Index