diff options
author | gVisor bot <gvisor-bot@google.com> | 2020-10-13 18:34:42 +0000 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2020-10-13 18:34:42 +0000 |
commit | ce89079990c8cd8a42ee675c7a5fd310c7fdd8de (patch) | |
tree | 6a7e204ac962705fabb545c531340e6098b6e503 /pkg/sentry/fsimpl | |
parent | 5846738e7bdaf2d9638d51a330d9306f856af6d7 (diff) | |
parent | 432963dd2d9f4797f26a8b2555464a50f8319537 (diff) |
Merge release-20200928.0-102-g432963dd2 (automated)
Diffstat (limited to 'pkg/sentry/fsimpl')
-rw-r--r-- | pkg/sentry/fsimpl/devtmpfs/devtmpfs.go | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/pkg/sentry/fsimpl/devtmpfs/devtmpfs.go b/pkg/sentry/fsimpl/devtmpfs/devtmpfs.go index ed729e480..e6fe0fc0d 100644 --- a/pkg/sentry/fsimpl/devtmpfs/devtmpfs.go +++ b/pkg/sentry/fsimpl/devtmpfs/devtmpfs.go @@ -95,10 +95,13 @@ func NewAccessor(ctx context.Context, vfsObj *vfs.VirtualFilesystem, creds *auth if err != nil { return nil, err } + // Pass a reference on root to the Accessor. + root := mntns.Root() + root.IncRef() return &Accessor{ vfsObj: vfsObj, mntns: mntns, - root: mntns.Root(), + root: root, creds: creds, }, nil } |