mirror of
https://github.com/opnsense/src.git
synced 2026-04-22 06:39:32 -04:00
Explicitly specify MAP_SHARED when mapping the stats file descriptor.
Reviewed by: kib MFC after: 1 week
This commit is contained in:
parent
5e93a4b46b
commit
2c2cd2c14c
1 changed files with 2 additions and 2 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Reference in a new issue