Date: Mon, 7 Oct 2019 23:31:18 +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: r353294 - head/sys/vm Message-ID: <201910072331.x97NVIEe098529@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: markj Date: Mon Oct 7 23:31:17 2019 New Revision: 353294 URL: https://svnweb.freebsd.org/changeset/base/353294 Log: Assert that the PGA_{WRITEABLE,EXECUTABLE} flags do not leak. Reviewed by: alc, kib MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D21783 Modified: head/sys/vm/vm_page.c Modified: head/sys/vm/vm_page.c ============================================================================== --- head/sys/vm/vm_page.c Mon Oct 7 23:19:09 2019 (r353293) +++ head/sys/vm/vm_page.c Mon Oct 7 23:31:17 2019 (r353294) @@ -3546,12 +3546,15 @@ vm_page_free_prep(vm_page_t m) m, i, (uintmax_t)*p)); } #endif - if ((m->oflags & VPO_UNMANAGED) == 0) + if ((m->oflags & VPO_UNMANAGED) == 0) { KASSERT(!pmap_page_is_mapped(m), ("vm_page_free_prep: freeing mapped page %p", m)); - else + KASSERT((m->aflags & (PGA_EXECUTABLE | PGA_WRITEABLE)) == 0, + ("vm_page_free_prep: mapping flags set in page %p", m)); + } else { KASSERT(m->queue == PQ_NONE, ("vm_page_free_prep: unmanaged page %p is queued", m)); + } VM_CNT_INC(v_tfree); if (vm_page_sbusied(m))
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201910072331.x97NVIEe098529>