Date: Tue, 24 Sep 2013 13:52:47 +0000 (UTC) From: Konstantin Belousov <kib@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255849 - head/sys/amd64/amd64 Message-ID: <201309241352.r8ODqlHP010936@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: kib Date: Tue Sep 24 13:52:47 2013 New Revision: 255849 URL: http://svnweb.freebsd.org/changeset/base/255849 Log: In pmap_clear_modify(), initialize pvh even for fictitious managed page, otherwise the small mappings loop would use uninitialized value. Note that currently pmap_clear_modify() is not called for fictitious pages. Sponsored by: The FreeBSD Foundation Approved by: re (glebius) Modified: head/sys/amd64/amd64/pmap.c Modified: head/sys/amd64/amd64/pmap.c ============================================================================== --- head/sys/amd64/amd64/pmap.c Tue Sep 24 13:46:13 2013 (r255848) +++ head/sys/amd64/amd64/pmap.c Tue Sep 24 13:52:47 2013 (r255849) @@ -5331,13 +5331,13 @@ pmap_clear_modify(vm_page_t m) */ if ((m->aflags & PGA_WRITEABLE) == 0) return; + pvh = pa_to_pvh(VM_PAGE_TO_PHYS(m)); rw_rlock(&pvh_global_lock); lock = VM_PAGE_TO_PV_LIST_LOCK(m); rw_wlock(lock); restart: if ((m->flags & PG_FICTITIOUS) != 0) goto small_mappings; - pvh = pa_to_pvh(VM_PAGE_TO_PHYS(m)); TAILQ_FOREACH_SAFE(pv, &pvh->pv_list, pv_next, next_pv) { pmap = PV_PMAP(pv); if (!PMAP_TRYLOCK(pmap)) {
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201309241352.r8ODqlHP010936>