Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 2 Jan 2014 18:49:05 +0000 (UTC)
From:      Konstantin Belousov <kib@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r260204 - head/sys/amd64/amd64
Message-ID:  <201401021849.s02In5Pl030972@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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;
 }
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201401021849.s02In5Pl030972>