mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-14 10:09:48 +00:00
Fix a very significant cnt.v_wire_count leak in vm_page.c, and some
minor leaks in pmap.c. Bruce Evans made me aware of this problem.
This commit is contained in:
parent
a01e62f093
commit
419702a468
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=16324
@ -39,7 +39,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: @(#)pmap.c 7.7 (Berkeley) 5/12/91
|
||||
* $Id: pmap.c,v 1.102 1996/06/08 06:48:27 dyson Exp $
|
||||
* $Id: pmap.c,v 1.103 1996/06/12 05:02:52 gpalmer Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
@ -418,8 +418,8 @@ pmap_unwire_pte_hold(vm_page_t m) {
|
||||
--cnt.v_wire_count;
|
||||
m->dirty = 0;
|
||||
vm_page_deactivate(m);
|
||||
return 1;
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
@ -1431,8 +1431,9 @@ _pmap_allocpte(pmap, va, ptepindex)
|
||||
s = splvm();
|
||||
vm_page_unqueue(m);
|
||||
splx(s);
|
||||
if (m->wire_count == 0)
|
||||
++cnt.v_wire_count;
|
||||
++m->wire_count;
|
||||
++cnt.v_wire_count;
|
||||
}
|
||||
|
||||
/*
|
||||
@ -1510,8 +1511,9 @@ pmap_allocpte(pmap, va)
|
||||
int s = splvm();
|
||||
vm_page_unqueue(m);
|
||||
splx(s);
|
||||
if (m->wire_count == 0)
|
||||
++cnt.v_wire_count;
|
||||
++m->wire_count;
|
||||
++cnt.v_wire_count;
|
||||
}
|
||||
++m->hold_count;
|
||||
return m;
|
||||
|
@ -39,7 +39,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: @(#)pmap.c 7.7 (Berkeley) 5/12/91
|
||||
* $Id: pmap.c,v 1.102 1996/06/08 06:48:27 dyson Exp $
|
||||
* $Id: pmap.c,v 1.103 1996/06/12 05:02:52 gpalmer Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
@ -418,8 +418,8 @@ pmap_unwire_pte_hold(vm_page_t m) {
|
||||
--cnt.v_wire_count;
|
||||
m->dirty = 0;
|
||||
vm_page_deactivate(m);
|
||||
return 1;
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
@ -1431,8 +1431,9 @@ _pmap_allocpte(pmap, va, ptepindex)
|
||||
s = splvm();
|
||||
vm_page_unqueue(m);
|
||||
splx(s);
|
||||
if (m->wire_count == 0)
|
||||
++cnt.v_wire_count;
|
||||
++m->wire_count;
|
||||
++cnt.v_wire_count;
|
||||
}
|
||||
|
||||
/*
|
||||
@ -1510,8 +1511,9 @@ pmap_allocpte(pmap, va)
|
||||
int s = splvm();
|
||||
vm_page_unqueue(m);
|
||||
splx(s);
|
||||
if (m->wire_count == 0)
|
||||
++cnt.v_wire_count;
|
||||
++m->wire_count;
|
||||
++cnt.v_wire_count;
|
||||
}
|
||||
++m->hold_count;
|
||||
return m;
|
||||
|
@ -34,7 +34,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: @(#)vm_page.c 7.4 (Berkeley) 5/7/91
|
||||
* $Id: vm_page.c,v 1.54 1996/06/05 03:31:48 dyson Exp $
|
||||
* $Id: vm_page.c,v 1.55 1996/06/08 06:48:34 dyson Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
@ -776,6 +776,7 @@ vm_page_freechk_and_unqueue(m)
|
||||
m->wire_count, m->pindex);
|
||||
}
|
||||
m->wire_count = 0;
|
||||
cnt.v_wire_count--;
|
||||
}
|
||||
|
||||
return 1;
|
||||
|
Loading…
Reference in New Issue
Block a user