diff options
author | gVisor bot <gvisor-bot@google.com> | 2021-10-27 00:04:06 +0000 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2021-10-27 00:04:06 +0000 |
commit | 4a42e7524518af56e34a922ddc717e963594f9a3 (patch) | |
tree | 3eeeb3418cae706f2d0989ecf5e09634f0781c74 /pkg/sentry/kernel | |
parent | 1295a9562a49567c519b5115afd836297a0a73f0 (diff) | |
parent | 7b8f19dc76a9fecbf4d2e5f43a47c6d47d53e100 (diff) |
Merge release-20211019.0-44-g7b8f19dc7 (automated)
Diffstat (limited to 'pkg/sentry/kernel')
-rw-r--r-- | pkg/sentry/kernel/kernel.go | 17 |
1 files changed, 3 insertions, 14 deletions
diff --git a/pkg/sentry/kernel/kernel.go b/pkg/sentry/kernel/kernel.go index d4851ccda..83299a9fb 100644 --- a/pkg/sentry/kernel/kernel.go +++ b/pkg/sentry/kernel/kernel.go @@ -418,10 +418,7 @@ func (k *Kernel) Init(args InitKernelArgs) error { return fmt.Errorf("failed to create pipefs filesystem: %v", err) } defer pipeFilesystem.DecRef(ctx) - pipeMount, err := k.vfs.NewDisconnectedMount(pipeFilesystem, nil, &vfs.MountOptions{}) - if err != nil { - return fmt.Errorf("failed to create pipefs mount: %v", err) - } + pipeMount := k.vfs.NewDisconnectedMount(pipeFilesystem, nil, &vfs.MountOptions{}) k.pipeMount = pipeMount tmpfsFilesystem, tmpfsRoot, err := tmpfs.NewFilesystem(ctx, &k.vfs, auth.NewRootCredentials(k.rootUserNamespace)) @@ -430,22 +427,14 @@ func (k *Kernel) Init(args InitKernelArgs) error { } defer tmpfsFilesystem.DecRef(ctx) defer tmpfsRoot.DecRef(ctx) - shmMount, err := k.vfs.NewDisconnectedMount(tmpfsFilesystem, tmpfsRoot, &vfs.MountOptions{}) - if err != nil { - return fmt.Errorf("failed to create tmpfs mount: %v", err) - } - k.shmMount = shmMount + k.shmMount = k.vfs.NewDisconnectedMount(tmpfsFilesystem, tmpfsRoot, &vfs.MountOptions{}) socketFilesystem, err := sockfs.NewFilesystem(&k.vfs) if err != nil { return fmt.Errorf("failed to create sockfs filesystem: %v", err) } defer socketFilesystem.DecRef(ctx) - socketMount, err := k.vfs.NewDisconnectedMount(socketFilesystem, nil, &vfs.MountOptions{}) - if err != nil { - return fmt.Errorf("failed to create sockfs mount: %v", err) - } - k.socketMount = socketMount + k.socketMount = k.vfs.NewDisconnectedMount(socketFilesystem, nil, &vfs.MountOptions{}) k.socketsVFS2 = make(map[*vfs.FileDescription]*SocketRecord) |