Source-Changes-HG archive

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

[src/netbsd-1-6]: src/sys/uvm Pull up revision 1.18 (requested by matt in tic...



details:   https://anonhg.NetBSD.org/src/rev/e6a6d110843b
branches:  netbsd-1-6
changeset: 529032:e6a6d110843b
user:      lukem <lukem%NetBSD.org@localhost>
date:      Sat Aug 24 03:17:10 2002 +0000

description:
Pull up revision 1.18 (requested by matt in ticket #719):
In amap_ref, only increment the amap's refcnt after we have established
the ppref array.  Otherwise, the newly ref'ed pages will be doubly
counted and thus never freed because the pprefcnt can't fall to 0.

diffstat:

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

diffs (26 lines):

diff -r 28914a194858 -r e6a6d110843b sys/uvm/uvm_amap_i.h
--- a/sys/uvm/uvm_amap_i.h      Sat Aug 24 02:57:20 2002 +0000
+++ b/sys/uvm/uvm_amap_i.h      Sat Aug 24 03:17:10 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: uvm_amap_i.h,v 1.17 2001/05/25 04:06:11 chs Exp $      */
+/*     $NetBSD: uvm_amap_i.h,v 1.17.16.1 2002/08/24 03:17:10 lukem Exp $       */
 
 /*
  *
@@ -206,13 +206,15 @@
        UVMHIST_FUNC("amap_ref"); UVMHIST_CALLED(maphist);
 
        amap_lock(amap);
-       amap->am_ref++;
        if (flags & AMAP_SHARED)
                amap->am_flags |= AMAP_SHARED;
 #ifdef UVM_AMAP_PPREF
        if (amap->am_ppref == NULL && (flags & AMAP_REFALL) == 0 &&
            len != amap->am_nslot)
                amap_pp_establish(amap);
+#endif
+       amap->am_ref++;
+#ifdef UVM_AMAP_PPREF
        if (amap->am_ppref && amap->am_ppref != PPREF_NONE) {
                if (flags & AMAP_REFALL)
                        amap_pp_adjref(amap, 0, amap->am_nslot, 1);



Home | Main Index | Thread Index | Old Index