Author: kib
Date: Thu Jan  2 18:49:05 2014
New Revision: 260204
URL: http://svnweb.freebsd.org/changeset/base/260204

Log:
  Assert that accounting for the pmap resident pages does not underflow.
  
  Reviewed by:  alc
  Sponsored by: The FreeBSD Foundation
  MFC after:    1 week

Modified:
  head/sys/amd64/amd64/pmap.c

Modified: head/sys/amd64/amd64/pmap.c
==============================================================================
--- head/sys/amd64/amd64/pmap.c Thu Jan  2 18:30:24 2014        (r260203)
+++ head/sys/amd64/amd64/pmap.c Thu Jan  2 18:49:05 2014        (r260204)
@@ -608,6 +608,9 @@ pmap_resident_count_dec(pmap_t pmap, int
 {
 
        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;
 }
 
_______________________________________________
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to