From 44cc4e9f2029f7ca83413a801230adbf8e00915d Mon Sep 17 00:00:00 2001 From: jhb Date: Wed, 15 Oct 2014 19:27:14 +0000 Subject: MFC 271721: Explicitly specify MAP_SHARED when mapping the stats file descriptor. --- lib/libgeom/geom_stats.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/libgeom') 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); -- cgit v1.1