From a3d28139be193510ec41b229e1c7e1c9b9d206c2 Mon Sep 17 00:00:00 2001 From: kib Date: Thu, 9 Jan 2014 03:24:36 +0000 Subject: MFC r260204: Assert that accounting for the pmap resident pages does not underflow. --- sys/amd64/amd64/pmap.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'sys') 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; } -- cgit v1.1