summaryrefslogtreecommitdiffhomepage
path: root/runsc/boot
diff options
context:
space:
mode:
authorTamir Duberstein <tamird@google.com>2021-05-25 18:53:36 -0700
committergVisor bot <gvisor-bot@google.com>2021-05-25 18:57:38 -0700
commitb63e61828d0652ad1769db342c17a3529d2d24ed (patch)
tree9f5a942cecbfd33c17af91d99fecc6918aec9393 /runsc/boot
parenta54cb9d8a2ca38c3d905f8694a18e6e8bef0e28f (diff)
Initialize Kernel.Timekeeper before network NS
PiperOrigin-RevId: 375843579
Diffstat (limited to 'runsc/boot')
-rw-r--r--runsc/boot/loader.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/runsc/boot/loader.go b/runsc/boot/loader.go
index 0c3bb1800..efa014b25 100644
--- a/runsc/boot/loader.go
+++ b/runsc/boot/loader.go
@@ -287,6 +287,7 @@ func New(args Args) (*Loader, error) {
return nil, fmt.Errorf("creating timekeeper: %w", err)
}
tk.SetClocks(time.NewCalibratedClocks())
+ k.SetTimekeeper(tk)
if err := enableStrace(args.Conf); err != nil {
return nil, fmt.Errorf("enabling strace: %w", err)
@@ -335,7 +336,6 @@ func New(args Args) (*Loader, error) {
// to createVFS in order to mount (among other things) procfs.
if err = k.Init(kernel.InitKernelArgs{
FeatureSet: cpuid.HostFeatureSet(),
- Timekeeper: tk,
RootUserNamespace: creds.UserNamespace,
RootNetworkNamespace: netns,
ApplicationCores: uint(args.NumCPU),