diff options
Diffstat (limited to 'init/main.c')
-rw-r--r-- | init/main.c | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/init/main.c b/init/main.c index 9d964511fe0c..421640fca375 100644 --- a/init/main.c +++ b/init/main.c @@ -58,7 +58,6 @@ #include <linux/rmap.h> #include <linux/mempolicy.h> #include <linux/key.h> -#include <linux/buffer_head.h> #include <linux/page_ext.h> #include <linux/debug_locks.h> #include <linux/debugobjects.h> @@ -825,9 +824,11 @@ static void __init mm_init(void) * bigger than MAX_ORDER unless SPARSEMEM. */ page_ext_init_flatmem(); - init_debug_pagealloc(); + init_mem_debugging_and_hardening(); report_meminit(); mem_init(); + /* page_owner must be initialized after buddy is ready */ + page_ext_init_flatmem_late(); kmem_cache_init(); kmemleak_init(); pgtable_init(); @@ -1034,7 +1035,6 @@ asmlinkage __visible void __init __no_sanitize_address start_kernel(void) fork_init(); proc_caches_init(); uts_ns_init(); - buffer_init(); key_init(); security_init(); dbg_late_init(); @@ -1480,8 +1480,14 @@ void __init console_on_rootfs(void) struct file *file = filp_open("/dev/console", O_RDWR, 0); if (IS_ERR(file)) { - pr_err("Warning: unable to open an initial console.\n"); - return; + pr_err("Warning: unable to open an initial console. Fallback to ttynull.\n"); + register_ttynull_console(); + + file = filp_open("/dev/console", O_RDWR, 0); + if (IS_ERR(file)) { + pr_err("Warning: Failed to add ttynull console. No stdin, stdout, and stderr for the init process!\n"); + return; + } } init_dup(file); init_dup(file); |