Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 28 May 2004 12:42:03 -0700 (PDT)
From:      Alan Cox <alc@FreeBSD.org>
To:        src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org
Subject:   cvs commit: src/sys/amd64/amd64 pmap.c src/sys/i386/i386 pmap.c
Message-ID:  <200405281942.i4SJg3aJ040317@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200405281942.i4SJg3aJ040317>