summaryrefslogtreecommitdiffhomepage
path: root/pkg
diff options
context:
space:
mode:
authorgVisor bot <gvisor-bot@google.com>2019-08-27 17:55:58 +0000
committergVisor bot <gvisor-bot@google.com>2019-08-27 17:55:58 +0000
commit0e4f2c8ca5b2df123e30bbe918cf09fcbe6c854f (patch)
treecaea090d8362e78d7a422d301d2cd0fc0afa5048 /pkg
parent509c77e37c9be212da7bee1c443dfa178bad1c43 (diff)
parentc39564332bdd5030b9031ed3b1a428464fea670e (diff)
Merge c3956433 (automated)
Diffstat (limited to 'pkg')
-rw-r--r--pkg/sentry/fs/mounts.go3
-rwxr-xr-xpkg/sentry/platform/ring0/defs_impl.go8
2 files changed, 5 insertions, 6 deletions
diff --git a/pkg/sentry/fs/mounts.go b/pkg/sentry/fs/mounts.go
index 9b713e785..ac0398bd9 100644
--- a/pkg/sentry/fs/mounts.go
+++ b/pkg/sentry/fs/mounts.go
@@ -171,8 +171,6 @@ type MountNamespace struct {
// NewMountNamespace returns a new MountNamespace, with the provided node at the
// root, and the given cache size. A root must always be provided.
func NewMountNamespace(ctx context.Context, root *Inode) (*MountNamespace, error) {
- creds := auth.CredentialsFromContext(ctx)
-
// Set the root dirent and id on the root mount. The reference returned from
// NewDirent will be donated to the MountNamespace constructed below.
d := NewDirent(ctx, root, "/")
@@ -181,6 +179,7 @@ func NewMountNamespace(ctx context.Context, root *Inode) (*MountNamespace, error
d: newRootMount(1, d),
}
+ creds := auth.CredentialsFromContext(ctx)
mns := MountNamespace{
userns: creds.UserNamespace,
root: d,
diff --git a/pkg/sentry/platform/ring0/defs_impl.go b/pkg/sentry/platform/ring0/defs_impl.go
index acae012dc..d4bfc5a4a 100755
--- a/pkg/sentry/platform/ring0/defs_impl.go
+++ b/pkg/sentry/platform/ring0/defs_impl.go
@@ -1,14 +1,14 @@
package ring0
import (
- "fmt"
- "gvisor.dev/gvisor/pkg/cpuid"
- "io"
- "reflect"
"syscall"
+ "fmt"
+ "gvisor.dev/gvisor/pkg/cpuid"
"gvisor.dev/gvisor/pkg/sentry/platform/ring0/pagetables"
"gvisor.dev/gvisor/pkg/sentry/usermem"
+ "io"
+ "reflect"
)
var (