svn commit: r332658 - head/sys/vm

Mark Johnston markj at FreeBSD.org
Tue Apr 17 18:49:18 UTC 2018


Author: markj
Date: Tue Apr 17 18:49:17 2018
New Revision: 332658
URL: https://svnweb.freebsd.org/changeset/base/332658

Log:
  Ensure that m and skip_m belong to the same object.
  
  Pages allocated from a given reservation may belong to different
  objects. It is therefore possible for vm_page_ps_test() to be called
  with the base page's object unlocked. Check for this case before
  asserting that the object lock is held.
  
  Reported by:	jhb
  Reviewed by:	kib
  MFC after:	1 week

Modified:
  head/sys/vm/vm_page.c

Modified: head/sys/vm/vm_page.c
==============================================================================
--- head/sys/vm/vm_page.c	Tue Apr 17 18:07:40 2018	(r332657)
+++ head/sys/vm/vm_page.c	Tue Apr 17 18:49:17 2018	(r332658)
@@ -4140,6 +4140,8 @@ vm_page_ps_test(vm_page_t m, int flags, vm_page_t skip
 	int i, npages;
 
 	object = m->object;
+	if (skip_m != NULL && skip_m->object != object)
+		return (false);
 	VM_OBJECT_ASSERT_LOCKED(object);
 	npages = atop(pagesizes[m->psind]);
 


More information about the svn-src-all mailing list