X-Git-Url: http://git.cascardo.info/?a=blobdiff_plain;f=init%2Fmain.c;h=61b993767db53e8401dc1223fa6e028f7edafd74;hb=3f70b89c27fe4f9cbef3e697c48024e063233a0d;hp=321d0ceb26d3782ed6871feef4c52090e9872b23;hpb=72a3697097b8dc92f5b8362598f5730a9986eb83;p=cascardo%2Flinux.git diff --git a/init/main.c b/init/main.c index 321d0ceb26d3..61b993767db5 100644 --- a/init/main.c +++ b/init/main.c @@ -51,7 +51,7 @@ #include #include #include -#include +#include #include #include #include @@ -78,6 +78,8 @@ #include #include #include +#include +#include #include #include @@ -486,10 +488,10 @@ void __init __weak thread_info_cache_init(void) static void __init mm_init(void) { /* - * page_cgroup requires contiguous pages, + * page_ext requires contiguous pages, * bigger than MAX_ORDER unless SPARSEMEM. */ - page_cgroup_init_flatmem(); + page_ext_init_flatmem(); mem_init(); kmem_cache_init(); percpu_init_late(); @@ -577,6 +579,10 @@ asmlinkage __visible void __init start_kernel(void) local_irq_disable(); idr_init_cache(); rcu_init(); + + /* trace_printk() and trace points may be used after this */ + trace_init(); + context_tracking_init(); radix_tree_init(); /* init some links before init_ISA_irqs() */ @@ -627,7 +633,7 @@ asmlinkage __visible void __init start_kernel(void) initrd_start = 0; } #endif - page_cgroup_init(); + page_ext_init(); debug_objects_mem_init(); kmemleak_init(); setup_per_cpu_pageset(); @@ -660,6 +666,7 @@ asmlinkage __visible void __init start_kernel(void) /* rootfs populating might need page-writeback */ page_writeback_init(); proc_root_init(); + nsfs_init(); cgroup_init(); cpuset_init(); taskstats_init_early(); @@ -959,8 +966,13 @@ static int __ref kernel_init(void *unused) ret = run_init_process(execute_command); if (!ret) return 0; +#ifndef CONFIG_INIT_FALLBACK + panic("Requested init %s failed (error %d).", + execute_command, ret); +#else pr_err("Failed to execute %s (error %d). Attempting defaults...\n", - execute_command, ret); + execute_command, ret); +#endif } if (!try_to_run_init_process("/sbin/init") || !try_to_run_init_process("/etc/init") || @@ -1026,8 +1038,11 @@ static noinline void __init kernel_init_freeable(void) * Ok, we have completed the initial bootup, and * we're essentially up and running. Get rid of the * initmem segments and start the user-mode stuff.. + * + * rootfs is available now, try loading the public keys + * and default modules */ - /* rootfs is available now, try loading default modules */ + integrity_load_keys(); load_default_modules(); }