Date: Wed, 15 Oct 2014 19:27:14 +0000 (UTC) From: John Baldwin <jhb@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r273145 - stable/10/lib/libgeom Message-ID: <201410151927.s9FJREJw014626@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: jhb Date: Wed Oct 15 19:27:14 2014 New Revision: 273145 URL: https://svnweb.freebsd.org/changeset/base/273145 Log: MFC 271721: Explicitly specify MAP_SHARED when mapping the stats file descriptor. Modified: stable/10/lib/libgeom/geom_stats.c Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libgeom/geom_stats.c ============================================================================== --- stable/10/lib/libgeom/geom_stats.c Wed Oct 15 19:12:05 2014 (r273144) +++ stable/10/lib/libgeom/geom_stats.c Wed Oct 15 19:27:14 2014 (r273145) @@ -68,7 +68,7 @@ geom_stats_resync(void) return; for (;;) { p = mmap(statp, (npages + 1) * pagesize, - PROT_READ, 0, statsfd, 0); + PROT_READ, MAP_SHARED, statsfd, 0); if (p == MAP_FAILED) break; else @@ -90,7 +90,7 @@ geom_stats_open(void) return (errno); pagesize = getpagesize(); spp = pagesize / sizeof(struct devstat); - p = mmap(NULL, pagesize, PROT_READ, 0, statsfd, 0); + p = mmap(NULL, pagesize, PROT_READ, MAP_SHARED, statsfd, 0); if (p == MAP_FAILED) { error = errno; close(statsfd);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201410151927.s9FJREJw014626>