Initialize Kernel.Timekeeper before network NS

PiperOrigin-RevId: 375843579
This commit is contained in:
Tamir Duberstein
2021-05-25 18:57:38 -07:00
committed by gVisor bot
parent a54cb9d8a2
commit b63e61828d
3 changed files with 14 additions and 12 deletions
+1 -1
View File
@@ -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),