summaryrefslogtreecommitdiffstats
path: root/sys/amd64
diff options
context:
space:
mode:
authorkib <kib@FreeBSD.org>2014-01-09 03:24:36 +0000
committerkib <kib@FreeBSD.org>2014-01-09 03:24:36 +0000
commita3d28139be193510ec41b229e1c7e1c9b9d206c2 (patch)
treea3c26614c9c9f92a961e1294ed370ee1cea98446 /sys/amd64
parente22a9135f10c9d734f1e5a828eff693c33d93ea4 (diff)
downloadFreeBSD-src-a3d28139be193510ec41b229e1c7e1c9b9d206c2.zip
FreeBSD-src-a3d28139be193510ec41b229e1c7e1c9b9d206c2.tar.gz
MFC r260204:
Assert that accounting for the pmap resident pages does not underflow.
Diffstat (limited to 'sys/amd64')
-rw-r--r--sys/amd64/amd64/pmap.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/sys/amd64/amd64/pmap.c b/sys/amd64/amd64/pmap.c
index 3126bbc..6ff1eae 100644
--- a/sys/amd64/amd64/pmap.c
+++ b/sys/amd64/amd64/pmap.c
@@ -608,6 +608,9 @@ pmap_resident_count_dec(pmap_t pmap, int count)
{
PMAP_LOCK_ASSERT(pmap, MA_OWNED);
+ KASSERT(pmap->pm_stats.resident_count >= count,
+ ("pmap %p resident count underflow %ld %d", pmap,
+ pmap->pm_stats.resident_count, count));
pmap->pm_stats.resident_count -= count;
}
OpenPOWER on IntegriCloud