Date: Wed, 17 Sep 2014 20:26:27 +0000 (UTC) From: Bryan Drewery <bdrewery@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271723 - head/lib/libc/gen Message-ID: <201409172026.s8HKQR8c054429@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: bdrewery Date: Wed Sep 17 20:26:27 2014 New Revision: 271723 URL: http://svnweb.freebsd.org/changeset/base/271723 Log: Explicitly set MAP_PRIVATE to avoid [EINVAL] after r271635. X-MFC-With: r271635 Reviewed by: jhb Modified: head/lib/libc/gen/nlist.c Modified: head/lib/libc/gen/nlist.c ============================================================================== --- head/lib/libc/gen/nlist.c Wed Sep 17 19:45:34 2014 (r271722) +++ head/lib/libc/gen/nlist.c Wed Sep 17 20:26:27 2014 (r271723) @@ -268,7 +268,7 @@ __elf_fdnlist(fd, list) } /* mmap section header table */ - base = mmap(NULL, (size_t)shdr_size, PROT_READ, 0, fd, + base = mmap(NULL, (size_t)shdr_size, PROT_READ, MAP_PRIVATE, fd, (off_t)ehdr.e_shoff); if (base == MAP_FAILED) return (-1); @@ -301,7 +301,7 @@ __elf_fdnlist(fd, list) * making the memory allocation permanent as with malloc/free * (i.e., munmap will return it to the system). */ - base = mmap(NULL, (size_t)symstrsize, PROT_READ, 0, fd, + base = mmap(NULL, (size_t)symstrsize, PROT_READ, MAP_PRIVATE, fd, (off_t)symstroff); if (base == MAP_FAILED) goto done;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201409172026.s8HKQR8c054429>