summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorjhb <jhb@FreeBSD.org>2014-10-15 19:27:14 +0000
committerjhb <jhb@FreeBSD.org>2014-10-15 19:27:14 +0000
commit44cc4e9f2029f7ca83413a801230adbf8e00915d (patch)
tree25e8fc28f372d4ce5234120d78a3dd697dcabb73 /lib
parent92c5a45b89b79dd541cdd42a298bd9ef50c0bd23 (diff)
downloadFreeBSD-src-44cc4e9f2029f7ca83413a801230adbf8e00915d.zip
FreeBSD-src-44cc4e9f2029f7ca83413a801230adbf8e00915d.tar.gz
MFC 271721:
Explicitly specify MAP_SHARED when mapping the stats file descriptor.
Diffstat (limited to 'lib')
-rw-r--r--lib/libgeom/geom_stats.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/libgeom/geom_stats.c b/lib/libgeom/geom_stats.c
index 14f9b22..48f7160 100644
--- a/lib/libgeom/geom_stats.c
+++ b/lib/libgeom/geom_stats.c
@@ -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);
OpenPOWER on IntegriCloud