diff options
Diffstat (limited to 'init')
-rw-r--r-- | init/Kconfig | 2 | ||||
-rw-r--r-- | init/do_mounts_initrd.c | 4 | ||||
-rw-r--r-- | init/main.c | 8 |
3 files changed, 9 insertions, 5 deletions
diff --git a/init/Kconfig b/init/Kconfig index fb19b46c0042..b023334df142 100644 --- a/init/Kconfig +++ b/init/Kconfig | |||
@@ -1192,7 +1192,7 @@ config CC_OPTIMIZE_FOR_SIZE | |||
1192 | Enabling this option will pass "-Os" instead of "-O2" to gcc | 1192 | Enabling this option will pass "-Os" instead of "-O2" to gcc |
1193 | resulting in a smaller kernel. | 1193 | resulting in a smaller kernel. |
1194 | 1194 | ||
1195 | If unsure, say Y. | 1195 | If unsure, say N. |
1196 | 1196 | ||
1197 | config SYSCTL | 1197 | config SYSCTL |
1198 | bool | 1198 | bool |
diff --git a/init/do_mounts_initrd.c b/init/do_mounts_initrd.c index 5e4ded51788e..f9acf71b9810 100644 --- a/init/do_mounts_initrd.c +++ b/init/do_mounts_initrd.c | |||
@@ -36,6 +36,10 @@ __setup("noinitrd", no_initrd); | |||
36 | static int init_linuxrc(struct subprocess_info *info, struct cred *new) | 36 | static int init_linuxrc(struct subprocess_info *info, struct cred *new) |
37 | { | 37 | { |
38 | sys_unshare(CLONE_FS | CLONE_FILES); | 38 | sys_unshare(CLONE_FS | CLONE_FILES); |
39 | /* stdin/stdout/stderr for /linuxrc */ | ||
40 | sys_open("/dev/console", O_RDWR, 0); | ||
41 | sys_dup(0); | ||
42 | sys_dup(0); | ||
39 | /* move initrd over / and chdir/chroot in initrd root */ | 43 | /* move initrd over / and chdir/chroot in initrd root */ |
40 | sys_chdir("/root"); | 44 | sys_chdir("/root"); |
41 | sys_mount(".", "/", NULL, MS_MOVE, NULL); | 45 | sys_mount(".", "/", NULL, MS_MOVE, NULL); |
diff --git a/init/main.c b/init/main.c index 85d69dffe864..cee4b5c66d81 100644 --- a/init/main.c +++ b/init/main.c | |||
@@ -604,7 +604,7 @@ asmlinkage void __init start_kernel(void) | |||
604 | pidmap_init(); | 604 | pidmap_init(); |
605 | anon_vma_init(); | 605 | anon_vma_init(); |
606 | #ifdef CONFIG_X86 | 606 | #ifdef CONFIG_X86 |
607 | if (efi_enabled) | 607 | if (efi_enabled(EFI_RUNTIME_SERVICES)) |
608 | efi_enter_virtual_mode(); | 608 | efi_enter_virtual_mode(); |
609 | #endif | 609 | #endif |
610 | thread_info_cache_init(); | 610 | thread_info_cache_init(); |
@@ -632,7 +632,7 @@ asmlinkage void __init start_kernel(void) | |||
632 | acpi_early_init(); /* before LAPIC and SMP init */ | 632 | acpi_early_init(); /* before LAPIC and SMP init */ |
633 | sfi_init_late(); | 633 | sfi_init_late(); |
634 | 634 | ||
635 | if (efi_enabled) { | 635 | if (efi_enabled(EFI_RUNTIME_SERVICES)) { |
636 | efi_late_init(); | 636 | efi_late_init(); |
637 | efi_free_boot_services(); | 637 | efi_free_boot_services(); |
638 | } | 638 | } |
@@ -802,7 +802,7 @@ static int run_init_process(const char *init_filename) | |||
802 | (const char __user *const __user *)envp_init); | 802 | (const char __user *const __user *)envp_init); |
803 | } | 803 | } |
804 | 804 | ||
805 | static void __init kernel_init_freeable(void); | 805 | static noinline void __init kernel_init_freeable(void); |
806 | 806 | ||
807 | static int __ref kernel_init(void *unused) | 807 | static int __ref kernel_init(void *unused) |
808 | { | 808 | { |
@@ -845,7 +845,7 @@ static int __ref kernel_init(void *unused) | |||
845 | "See Linux Documentation/init.txt for guidance."); | 845 | "See Linux Documentation/init.txt for guidance."); |
846 | } | 846 | } |
847 | 847 | ||
848 | static void __init kernel_init_freeable(void) | 848 | static noinline void __init kernel_init_freeable(void) |
849 | { | 849 | { |
850 | /* | 850 | /* |
851 | * Wait until kthreadd is all set-up. | 851 | * Wait until kthreadd is all set-up. |