diff options
Diffstat (limited to 'init')
-rw-r--r-- | init/do_mounts_initrd.c | 1 | ||||
-rw-r--r-- | init/initramfs.c | 4 | ||||
-rw-r--r-- | init/main.c | 5 |
3 files changed, 10 insertions, 0 deletions
diff --git a/init/do_mounts_initrd.c b/init/do_mounts_initrd.c index 919a80cb322e..2cfd7cb36e79 100644 --- a/init/do_mounts_initrd.c +++ b/init/do_mounts_initrd.c @@ -6,6 +6,7 @@ #include <linux/romfs_fs.h> #include <linux/initrd.h> #include <linux/sched.h> +#include <linux/freezer.h> #include "do_mounts.h" diff --git a/init/initramfs.c b/init/initramfs.c index d28c1094d7e5..85f04037ade1 100644 --- a/init/initramfs.c +++ b/init/initramfs.c @@ -182,6 +182,10 @@ static int __init do_collect(void) static int __init do_header(void) { + if (memcmp(collected, "070707", 6)==0) { + error("incorrect cpio method used: use -H newc option"); + return 1; + } if (memcmp(collected, "070701", 6)) { error("no cpio magic"); return 1; diff --git a/init/main.c b/init/main.c index 36f608a7cfba..1174ae3aec8c 100644 --- a/init/main.c +++ b/init/main.c @@ -29,6 +29,7 @@ #include <linux/percpu.h> #include <linux/kmod.h> #include <linux/kernel_stat.h> +#include <linux/start_kernel.h> #include <linux/security.h> #include <linux/workqueue.h> #include <linux/profile.h> @@ -73,6 +74,10 @@ #error Sorry, your GCC is too old. It builds incorrect kernels. #endif +#if __GNUC__ == 4 && __GNUC_MINOR__ == 1 && __GNUC_PATCHLEVEL__ == 0 +#warning gcc-4.1.0 is known to miscompile the kernel. A different compiler version is recommended. +#endif + static int init(void *); extern void init_IRQ(void); |