[Midnightbsd-cvs] src [8125] trunk/sys/vm/vm_object.c: plug the accounting leak for the wired pages when msync(MS_INVALIDATE) is performed ont eh vnode mapping which is wired in other address space.

laffer1 at midnightbsd.org laffer1 at midnightbsd.org
Fri Sep 16 17:42:58 EDT 2016


Revision: 8125
          http://svnweb.midnightbsd.org/src/?rev=8125
Author:   laffer1
Date:     2016-09-16 17:42:57 -0400 (Fri, 16 Sep 2016)
Log Message:
-----------
plug the accounting leak for the wired pages when msync(MS_INVALIDATE) is performed ont eh vnode mapping which is wired in other address space. Obtained from: FreeBSD svn 240989

Modified Paths:
--------------
    trunk/sys/vm/vm_object.c

Modified: trunk/sys/vm/vm_object.c
===================================================================
--- trunk/sys/vm/vm_object.c	2016-09-16 21:42:06 UTC (rev 8124)
+++ trunk/sys/vm/vm_object.c	2016-09-16 21:42:57 UTC (rev 8125)
@@ -1893,8 +1893,13 @@
 		if ((options & OBJPR_NOTMAPPED) == 0) {
 			pmap_remove_all(p);
 			/* Account for removal of wired mappings. */
-			if (wirings != 0)
-				p->wire_count -= wirings;
+			if (wirings != 0) {
+				KASSERT(p->wire_count == wirings,
+				    ("inconsistent wire count %d %d %p",
+				    p->wire_count, wirings, p));
+				p->wire_count = 0;
+				atomic_subtract_int(&cnt.v_wire_count, 1);
+			}
 		}
 		vm_page_free(p);
 		vm_page_unlock(p);



More information about the Midnightbsd-cvs mailing list