mirror of
https://github.com/opnsense/src.git
synced 2026-06-08 16:22:46 -04:00
pmap_remove_pages:
Add KASSERT to detect out of range access to the pv_table and report the errant pte before it's overwritten.
This commit is contained in:
parent
18443fbd98
commit
7f8d227938
2 changed files with 8 additions and 2 deletions
|
|
@ -39,7 +39,7 @@
|
|||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: @(#)pmap.c 7.7 (Berkeley) 5/12/91
|
||||
* $Id: pmap.c,v 1.243 1999/07/31 04:10:31 alc Exp $
|
||||
* $Id: pmap.c,v 1.244 1999/07/31 23:02:57 alc Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
|
|
@ -2967,6 +2967,9 @@ pmap_remove_pages(pmap, sva, eva)
|
|||
|
||||
ppv = pa_to_pvh(tpte);
|
||||
|
||||
KASSERT(ppv < &pv_table[pv_npg],
|
||||
("pmap_remove_pages: bad tpte %x", tpte));
|
||||
|
||||
pv->pv_pmap->pm_stats.resident_count--;
|
||||
|
||||
/*
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@
|
|||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: @(#)pmap.c 7.7 (Berkeley) 5/12/91
|
||||
* $Id: pmap.c,v 1.243 1999/07/31 04:10:31 alc Exp $
|
||||
* $Id: pmap.c,v 1.244 1999/07/31 23:02:57 alc Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
|
|
@ -2967,6 +2967,9 @@ pmap_remove_pages(pmap, sva, eva)
|
|||
|
||||
ppv = pa_to_pvh(tpte);
|
||||
|
||||
KASSERT(ppv < &pv_table[pv_npg],
|
||||
("pmap_remove_pages: bad tpte %x", tpte));
|
||||
|
||||
pv->pv_pmap->pm_stats.resident_count--;
|
||||
|
||||
/*
|
||||
|
|
|
|||
Loading…
Reference in a new issue