diff options
author | Stephen Rothwell <sfr@canb.auug.org.au> | 2008-04-24 15:57:31 +1000 |
---|---|---|
committer | Stephen Rothwell <sfr@canb.auug.org.au> | 2008-04-24 15:57:31 +1000 |
commit | c06a96943527fa984813e35361835e520f67afdd (patch) | |
tree | 0caba29b295ca07d0ae35d44ac2b95ebaa2087b4 /init | |
parent | f3090bef383fa0c2ee3414880c2b937b01a26b02 (diff) | |
parent | 8a5e2007d1c762af8ec25102c7b2f80ea6c4b5dc (diff) |
Merge commit 'x86-latest/latest'
Diffstat (limited to 'init')
-rw-r--r-- | init/do_mounts.c | 8 | ||||
-rw-r--r-- | init/main.c | 9 |
2 files changed, 15 insertions, 2 deletions
diff --git a/init/do_mounts.c b/init/do_mounts.c index 3885e70e7759..0dc5eb0bb895 100644 --- a/init/do_mounts.c +++ b/init/do_mounts.c @@ -201,9 +201,13 @@ static int __init do_mount_root(char *name, char *fs, int flags, void *data) return 0; } +#if PAGE_SIZE < PATH_MAX +# error increase the fs_names allocation size here +#endif + void __init mount_block_root(char *name, int flags) { - char *fs_names = __getname(); + char *fs_names = (void *)__get_free_pages(GFP_KERNEL | __GFP_ZERO, 1); char *p; #ifdef CONFIG_BLOCK char b[BDEVNAME_SIZE]; @@ -251,7 +255,7 @@ retry: #endif panic("VFS: Unable to mount root fs on %s", b); out: - putname(fs_names); + free_pages((unsigned long)fs_names, 1); } #ifdef CONFIG_ROOT_NFS diff --git a/init/main.c b/init/main.c index 9a5e55016610..eaf2ef1c8caf 100644 --- a/init/main.c +++ b/init/main.c @@ -14,6 +14,7 @@ #include <linux/proc_fs.h> #include <linux/kernel.h> #include <linux/syscalls.h> +#include <linux/stackprotector.h> #include <linux/string.h> #include <linux/ctype.h> #include <linux/delay.h> @@ -58,6 +59,7 @@ #include <linux/kthread.h> #include <linux/sched.h> #include <linux/signal.h> +#include <linux/kmemcheck.h> #include <asm/io.h> #include <asm/bugs.h> @@ -538,6 +540,12 @@ asmlinkage void __init start_kernel(void) */ unwind_init(); lockdep_init(); + + /* + * Set up the the initial canary ASAP: + */ + boot_init_stack_canary(); + cgroup_init_early(); local_irq_disable(); @@ -773,6 +781,7 @@ static void __init do_pre_smp_initcalls(void) { extern int spawn_ksoftirqd(void); + kmemcheck_init(); migration_init(); spawn_ksoftirqd(); if (!nosoftlockup) |