diff options
author | Tamir Duberstein <tamird@google.com> | 2021-05-25 18:53:36 -0700 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2021-05-25 18:57:38 -0700 |
commit | b63e61828d0652ad1769db342c17a3529d2d24ed (patch) | |
tree | 9f5a942cecbfd33c17af91d99fecc6918aec9393 /pkg/sentry/fsimpl | |
parent | a54cb9d8a2ca38c3d905f8694a18e6e8bef0e28f (diff) |
Initialize Kernel.Timekeeper before network NS
PiperOrigin-RevId: 375843579
Diffstat (limited to 'pkg/sentry/fsimpl')
-rw-r--r-- | pkg/sentry/fsimpl/testutil/kernel.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/pkg/sentry/fsimpl/testutil/kernel.go b/pkg/sentry/fsimpl/testutil/kernel.go index 8d47b5c40..438840ae2 100644 --- a/pkg/sentry/fsimpl/testutil/kernel.go +++ b/pkg/sentry/fsimpl/testutil/kernel.go @@ -88,6 +88,7 @@ func Boot() (*kernel.Kernel, error) { return nil, fmt.Errorf("creating timekeeper: %v", err) } tk.SetClocks(time.NewCalibratedClocks()) + k.SetTimekeeper(tk) creds := auth.NewRootCredentials(auth.NewRootUserNamespace()) @@ -96,7 +97,6 @@ func Boot() (*kernel.Kernel, error) { if err = k.Init(kernel.InitKernelArgs{ ApplicationCores: uint(runtime.GOMAXPROCS(-1)), FeatureSet: cpuid.HostFeatureSet(), - Timekeeper: tk, RootUserNamespace: creds.UserNamespace, Vdso: vdso, RootUTSNamespace: kernel.NewUTSNamespace("hostname", "domain", creds.UserNamespace), |