Date: Fri, 15 Oct 2010 02:58:49 +0000 (UTC) From: Alan Cox <alc@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r213886 - stable/8/sys/vm Message-ID: <201010150258.o9F2wnpS046341@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: alc Date: Fri Oct 15 02:58:49 2010 New Revision: 213886 URL: http://svn.freebsd.org/changeset/base/213886 Log: MFC r212873 Allow a POSIX shared memory object that is opened for read but not for write to nonetheless be mapped PROT_WRITE and MAP_PRIVATE, i.e., copy-on-write. PR: 150260 Modified: stable/8/sys/vm/vm_mmap.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/vm/vm_mmap.c ============================================================================== --- stable/8/sys/vm/vm_mmap.c Thu Oct 14 23:38:37 2010 (r213885) +++ stable/8/sys/vm/vm_mmap.c Fri Oct 15 02:58:49 2010 (r213886) @@ -1316,7 +1316,8 @@ vm_mmap_shm(struct thread *td, vm_size_t { int error; - if ((*maxprotp & VM_PROT_WRITE) == 0 && + if ((*flagsp & MAP_SHARED) != 0 && + (*maxprotp & VM_PROT_WRITE) == 0 && (prot & PROT_WRITE) != 0) return (EACCES); #ifdef MAC
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201010150258.o9F2wnpS046341>