diff options
author | gVisor bot <gvisor-bot@google.com> | 2021-06-24 00:08:50 +0000 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2021-06-24 00:08:50 +0000 |
commit | 689cacfe50626081f7f18cb7c54747d528abb861 (patch) | |
tree | 8fe7475714fe49f8a4b558b77a6d8bf137868a53 /pkg/sentry/usage/memory.go | |
parent | f5e7282890c4a0bc42f6b48b0afa2c2cd9513491 (diff) | |
parent | 7e0c1d9f1eae5620d38a6434c27442a350828876 (diff) |
Merge release-20210614.0-20-g7e0c1d9f1 (automated)
Diffstat (limited to 'pkg/sentry/usage/memory.go')
-rw-r--r-- | pkg/sentry/usage/memory.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/pkg/sentry/usage/memory.go b/pkg/sentry/usage/memory.go index 581862ee2..e7073ec87 100644 --- a/pkg/sentry/usage/memory.go +++ b/pkg/sentry/usage/memory.go @@ -132,7 +132,7 @@ func Init() error { // always be the case for a newly mapped page from /dev/shm. If we obtain // the shared memory through some other means in the future, we may have to // explicitly zero the page. - mmap, err := unix.Mmap(int(file.Fd()), 0, int(RTMemoryStatsSize), unix.PROT_READ|unix.PROT_WRITE, unix.MAP_SHARED) + mmap, err := memutil.MapFile(0, RTMemoryStatsSize, unix.PROT_READ|unix.PROT_WRITE, unix.MAP_SHARED, file.Fd(), 0) if err != nil { return fmt.Errorf("error mapping usage file: %v", err) } |