summaryrefslogtreecommitdiff
path: root/init
diff options
context:
space:
mode:
authorStephen Rothwell <sfr@canb.auug.org.au>2008-04-21 19:08:22 +1000
committerStephen Rothwell <sfr@canb.auug.org.au>2008-04-21 19:08:22 +1000
commit54d702c3b110fe6602d21aebe067f6c42e4a0b89 (patch)
tree4c8782fee57dda86872cd1e5fd5060d15968c640 /init
parentd6bce0d512185654361ff988aa01496ae883e4d5 (diff)
parentc2569a243675475a533bc701942468cd42f4b7f9 (diff)
Merge commit 'x86-latest/latest'
Conflicts: arch/x86/pci/acpi.c arch/x86/pci/common.c arch/x86/pci/pci.h include/asm-powerpc/bitops.h
Diffstat (limited to 'init')
-rw-r--r--init/do_mounts.c8
-rw-r--r--init/main.c9
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)