summaryrefslogtreecommitdiffhomepage
path: root/pkg/sentry
diff options
context:
space:
mode:
authorgVisor bot <gvisor-bot@google.com>2020-08-03 15:25:25 -0700
committergVisor bot <gvisor-bot@google.com>2020-08-03 15:30:30 -0700
commitfe441dd251ba19e6ba8a8ed6f0fa3c147e03360c (patch)
treefff33982f4513a18aa6c56bd5af4ea5672c4dce1 /pkg/sentry
parent5626ccf61f718d80d46049e11d040a3a8fc72fb9 (diff)
Internal change.
PiperOrigin-RevId: 324695672
Diffstat (limited to 'pkg/sentry')
-rw-r--r--pkg/sentry/pgalloc/pgalloc.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/pkg/sentry/pgalloc/pgalloc.go b/pkg/sentry/pgalloc/pgalloc.go
index 3243d7214..46d3be58c 100644
--- a/pkg/sentry/pgalloc/pgalloc.go
+++ b/pkg/sentry/pgalloc/pgalloc.go
@@ -409,7 +409,6 @@ func (f *MemoryFile) Allocate(length uint64, kind usage.MemoryKind) (memmap.File
f.mappingsMu.Unlock()
}
- // Mark selected pages as in use.
if f.opts.ManualZeroing {
if err := f.forEachMappingSlice(fr, func(bs []byte) {
for i := range bs {
@@ -419,6 +418,7 @@ func (f *MemoryFile) Allocate(length uint64, kind usage.MemoryKind) (memmap.File
return memmap.FileRange{}, err
}
}
+ // Mark selected pages as in use.
if !f.usage.Add(fr, usageInfo{
kind: kind,
refs: 1,