From owner-cvs-src@FreeBSD.ORG Fri May 28 12:42:13 2004 Return-Path: Delivered-To: cvs-src@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 73F9116A4CE; Fri, 28 May 2004 12:42:13 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6C91443D45; Fri, 28 May 2004 12:42:13 -0700 (PDT) (envelope-from alc@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.11/8.12.11) with ESMTP id i4SJg3eH040327; Fri, 28 May 2004 12:42:04 -0700 (PDT) (envelope-from alc@repoman.freebsd.org) Received: (from alc@localhost) by repoman.freebsd.org (8.12.11/8.12.11/Submit) id i4SJg3aJ040317; Fri, 28 May 2004 12:42:03 -0700 (PDT) (envelope-from alc) Message-Id: <200405281942.i4SJg3aJ040317@repoman.freebsd.org> From: Alan Cox Date: Fri, 28 May 2004 12:42:03 -0700 (PDT) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: HEAD Subject: cvs commit: src/sys/amd64/amd64 pmap.c src/sys/i386/i386 pmap.c X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 28 May 2004 19:42:13 -0000 alc 2004/05/28 12:42:03 PDT FreeBSD src repository Modified files: sys/amd64/amd64 pmap.c sys/i386/i386 pmap.c Log: Remove a broken micro-optimization from pmap_enter(). The ill effect of this micro-optimization occurs when we call pmap_enter() to wire an already mapped page. Because of the micro-optimization, we fail to mark the PTE as wired. Later, on teardown of the address space, pmap_remove_pages() destroys the PTE before vm_fault_unwire() has unwired the page. (pmap_remove_pages() is not supposed to destroy wired PTEs. They are destroyed by a later call to pmap_remove().) Thus, the page becomes lost. Note: The page is not lost if the application called munlock(2), only if it relies on teardown of the address space to unwire its pages. For the historically inclined, this bug was introduced by a megacommit, revision 1.182, roughly six years ago. Leak observed by: green@ and dillon independently Patch submitted by: dillon at backplane dot com Reviewed by: tegge@ MFC after: 1 week Revision Changes Path 1.461 +0 -8 src/sys/amd64/amd64/pmap.c 1.467 +0 -8 src/sys/i386/i386/pmap.c