diff options
author | gVisor bot <gvisor-bot@google.com> | 2020-02-14 19:16:42 +0000 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2020-02-14 19:16:42 +0000 |
commit | f14b6a9db839352020e7284670feafad36647a56 (patch) | |
tree | 6e2e0a91363f440789b01e6e355787f99f3ed786 /runsc/boot | |
parent | 10427e352365bfac7f5e458d19055b48c7d08bcb (diff) | |
parent | 4075de11be44372c454aae7f9650cdc814c52229 (diff) |
Merge release-20200211.0-17-g4075de1 (automated)
Diffstat (limited to 'runsc/boot')
-rw-r--r-- | runsc/boot/loader.go | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/runsc/boot/loader.go b/runsc/boot/loader.go index 9f0d5d7af..239ca5302 100644 --- a/runsc/boot/loader.go +++ b/runsc/boot/loader.go @@ -795,16 +795,19 @@ func (l *Loader) executeAsync(args *control.ExecArgs) (kernel.ThreadID, error) { return 0, fmt.Errorf("container %q not started", args.ContainerID) } + // TODO(gvisor.dev/issue/1623): Add VFS2 support + // Get the container MountNamespace from the Task. tg.Leader().WithMuLocked(func(t *kernel.Task) { - // task.MountNamespace() does not take a ref, so we must do so - // ourselves. + // task.MountNamespace() does not take a ref, so we must do so ourselves. args.MountNamespace = t.MountNamespace() args.MountNamespace.IncRef() }) - defer args.MountNamespace.DecRef() + if args.MountNamespace != nil { + defer args.MountNamespace.DecRef() + } - // Add the HOME enviroment varible if it is not already set. + // Add the HOME environment variable if it is not already set. root := args.MountNamespace.Root() defer root.DecRef() ctx := fs.WithRoot(l.k.SupervisorContext(), root) |