Date: Tue, 15 Oct 2019 14:23:16 +0000 (UTC) From: Mark Johnston <markj@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r353557 - stable/12/sys/vm Message-ID: <201910151423.x9FENG1s006849@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: markj Date: Tue Oct 15 14:23:16 2019 New Revision: 353557 URL: https://svnweb.freebsd.org/changeset/base/353557 Log: MFC r353294: Assert that the PGA_{WRITEABLE,EXECUTABLE} flags do not leak. Modified: stable/12/sys/vm/vm_page.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/vm/vm_page.c ============================================================================== --- stable/12/sys/vm/vm_page.c Tue Oct 15 14:20:11 2019 (r353556) +++ stable/12/sys/vm/vm_page.c Tue Oct 15 14:23:16 2019 (r353557) @@ -3401,9 +3401,12 @@ vm_page_free_prep(vm_page_t m) vm_page_lock_assert(m, MA_OWNED); 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?201910151423.x9FENG1s006849>