svn commit: r260465 - stable/9/sys/amd64/amd64

Konstantin Belousov kib at FreeBSD.org
Thu Jan 9 03:25:08 UTC 2014


Author: kib
Date: Thu Jan  9 03:25:08 2014
New Revision: 260465
URL: http://svnweb.freebsd.org/changeset/base/260465

Log:
  MFC r260204:
  Assert that accounting for the pmap resident pages does not underflow.

Modified:
  stable/9/sys/amd64/amd64/pmap.c
Directory Properties:
  stable/9/sys/   (props changed)

Modified: stable/9/sys/amd64/amd64/pmap.c
==============================================================================
--- stable/9/sys/amd64/amd64/pmap.c	Thu Jan  9 03:24:36 2014	(r260464)
+++ stable/9/sys/amd64/amd64/pmap.c	Thu Jan  9 03:25:08 2014	(r260465)
@@ -479,6 +479,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;
 }
 


More information about the svn-src-all mailing list