Date: Tue, 17 Apr 2018 18:49:17 +0000 (UTC) From: Mark Johnston <markj@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r332658 - head/sys/vm Message-ID: <201804171849.w3HInHT3001217@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
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]);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201804171849.w3HInHT3001217>