diff options
Diffstat (limited to 'init')
-rw-r--r-- | init/Kconfig | 12 | ||||
-rw-r--r-- | init/initramfs.c | 24 | ||||
-rw-r--r-- | init/main.c | 1 |
3 files changed, 23 insertions, 14 deletions
diff --git a/init/Kconfig b/init/Kconfig index b9923b1434a..38416a199de 100644 --- a/init/Kconfig +++ b/init/Kconfig @@ -31,19 +31,8 @@ config EXPERIMENTAL you say Y here, you will be offered the choice of using features or drivers that are currently considered to be in the alpha-test phase. -config CLEAN_COMPILE - bool "Select only drivers expected to compile cleanly" if EXPERIMENTAL - default y - help - Select this option if you don't even want to see the option - to configure known-broken drivers. - - If unsure, say Y - config BROKEN bool - depends on !CLEAN_COMPILE - default y config BROKEN_ON_SMP bool @@ -180,7 +169,6 @@ config SYSCTL config AUDIT bool "Auditing support" depends on NET - default y if SECURITY_SELINUX help Enable auditing infrastructure that can be used with another kernel subsystem, such as SELinux (which requires this for diff --git a/init/initramfs.c b/init/initramfs.c index 0c5d9a3f951..637344b0598 100644 --- a/init/initramfs.c +++ b/init/initramfs.c @@ -466,10 +466,32 @@ static char * __init unpack_to_rootfs(char *buf, unsigned len, int check_only) extern char __initramfs_start[], __initramfs_end[]; #ifdef CONFIG_BLK_DEV_INITRD #include <linux/initrd.h> +#include <linux/kexec.h> static void __init free_initrd(void) { - free_initrd_mem(initrd_start, initrd_end); +#ifdef CONFIG_KEXEC + unsigned long crashk_start = (unsigned long)__va(crashk_res.start); + unsigned long crashk_end = (unsigned long)__va(crashk_res.end); + + /* + * If the initrd region is overlapped with crashkernel reserved region, + * free only memory that is not part of crashkernel region. + */ + if (initrd_start < crashk_end && initrd_end > crashk_start) { + /* + * Initialize initrd memory region since the kexec boot does + * not do. + */ + memset((void *)initrd_start, 0, initrd_end - initrd_start); + if (initrd_start < crashk_start) + free_initrd_mem(initrd_start, crashk_start); + if (initrd_end > crashk_end) + free_initrd_mem(crashk_end, initrd_end); + } else +#endif + free_initrd_mem(initrd_start, initrd_end); + initrd_start = 0; initrd_end = 0; } diff --git a/init/main.c b/init/main.c index 7c79da57d3a..4c194c47395 100644 --- a/init/main.c +++ b/init/main.c @@ -668,7 +668,6 @@ static int init(void * unused) */ child_reaper = current; - /* Sets up cpus_possible() */ smp_prepare_cpus(max_cpus); do_pre_smp_initcalls(); |