From owner-svn-src-all@FreeBSD.ORG Sat Oct 31 17:39:56 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id ACBF61065676; Sat, 31 Oct 2009 17:39:56 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9BD418FC18; Sat, 31 Oct 2009 17:39:56 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n9VHduJI097563; Sat, 31 Oct 2009 17:39:56 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n9VHdu6T097561; Sat, 31 Oct 2009 17:39:56 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <200910311739.n9VHdu6T097561@svn.freebsd.org> From: Alan Cox Date: Sat, 31 Oct 2009 17:39:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r198721 - head/sys/vm X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 Oct 2009 17:39:56 -0000 Author: alc Date: Sat Oct 31 17:39:56 2009 New Revision: 198721 URL: http://svn.freebsd.org/changeset/base/198721 Log: Correct an error in vm_fault_copy_entry() that has existed since the first version of this file. When a process forks, any wired pages are immediately copied because copy-on-write is not supported for wired pages. In other words, the child process is given its own private copy of each wired page from its parent's address space. Unfortunately, to date, these copied pages have been mapped into the child's address space with the wrong permissions, typically VM_PROT_ALL. This change corrects the permissions. Reviewed by: kib Modified: head/sys/vm/vm_fault.c Modified: head/sys/vm/vm_fault.c ============================================================================== --- head/sys/vm/vm_fault.c Sat Oct 31 17:28:08 2009 (r198720) +++ head/sys/vm/vm_fault.c Sat Oct 31 17:39:56 2009 (r198721) @@ -1179,7 +1179,7 @@ vm_fault_copy_entry(vm_map_t dst_map, vm dst_object->uip = dst_entry->uip; dst_entry->uip = NULL; } - access = prot = dst_entry->max_protection; + access = prot = dst_entry->protection; /* * If not an upgrade, then enter the mappings in the pmap as * read and/or execute accesses. Otherwise, enter them as