From owner-svn-src-head@FreeBSD.ORG Tue Sep 24 13:52:48 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 12D052A9; Tue, 24 Sep 2013 13:52:48 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id F29082F2F; Tue, 24 Sep 2013 13:52:47 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r8ODql4K010937; Tue, 24 Sep 2013 13:52:47 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8ODqlHP010936; Tue, 24 Sep 2013 13:52:47 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201309241352.r8ODqlHP010936@svn.freebsd.org> From: Konstantin Belousov Date: Tue, 24 Sep 2013 13:52:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255849 - head/sys/amd64/amd64 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Sep 2013 13:52:48 -0000 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)) {