summaryrefslogtreecommitdiffhomepage
path: root/pkg/sentry/fsimpl
diff options
context:
space:
mode:
authorgVisor bot <gvisor-bot@google.com>2020-11-17 23:06:53 +0000
committergVisor bot <gvisor-bot@google.com>2020-11-17 23:06:53 +0000
commit543fc893e3a8a6c62a26ced3191be2c8b5b8d38d (patch)
treec4b8184aae6cf04d27d2ec65b97fa3eac7ec90eb /pkg/sentry/fsimpl
parentccc4fc176ceef3215731e02a1c32f7c8b7292803 (diff)
parent10ba578c018294bb037a7eb90010491cdda270a7 (diff)
Merge release-20201109.0-62-g10ba578c0 (automated)
Diffstat (limited to 'pkg/sentry/fsimpl')
-rw-r--r--pkg/sentry/fsimpl/tmpfs/filesystem.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/pkg/sentry/fsimpl/tmpfs/filesystem.go b/pkg/sentry/fsimpl/tmpfs/filesystem.go
index e39cd305b..61138a7a4 100644
--- a/pkg/sentry/fsimpl/tmpfs/filesystem.go
+++ b/pkg/sentry/fsimpl/tmpfs/filesystem.go
@@ -381,6 +381,8 @@ afterTrailingSymlink:
creds := rp.Credentials()
child := fs.newDentry(fs.newRegularFile(creds.EffectiveKUID, creds.EffectiveKGID, opts.Mode))
parentDir.insertChildLocked(child, name)
+ child.IncRef()
+ defer child.DecRef(ctx)
unlock()
fd, err := child.open(ctx, rp, &opts, true)
if err != nil {