aboutsummaryrefslogtreecommitdiffstats
path: root/init/do_mounts.c
diff options
context:
space:
mode:
Diffstat (limited to 'init/do_mounts.c')
-rw-r--r--init/do_mounts.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/init/do_mounts.c b/init/do_mounts.c
index 42b0707c3481..d3f0aeed2d39 100644
--- a/init/do_mounts.c
+++ b/init/do_mounts.c
@@ -1,3 +1,13 @@
1/*
2 * Many of the syscalls used in this file expect some of the arguments
3 * to be __user pointers not __kernel pointers. To limit the sparse
4 * noise, turn off sparse checking for this file.
5 */
6#ifdef __CHECKER__
7#undef __CHECKER__
8#warning "Sparse checking disabled for this file"
9#endif
10
1#include <linux/module.h> 11#include <linux/module.h>
2#include <linux/sched.h> 12#include <linux/sched.h>
3#include <linux/ctype.h> 13#include <linux/ctype.h>
@@ -330,7 +340,7 @@ static int __init do_mount_root(char *name, char *fs, int flags, void *data)
330 if (err) 340 if (err)
331 return err; 341 return err;
332 342
333 sys_chdir((const char __user __force *)"/root"); 343 sys_chdir("/root");
334 s = current->fs->pwd.dentry->d_sb; 344 s = current->fs->pwd.dentry->d_sb;
335 ROOT_DEV = s->s_dev; 345 ROOT_DEV = s->s_dev;
336 printk(KERN_INFO 346 printk(KERN_INFO
@@ -556,5 +566,5 @@ void __init prepare_namespace(void)
556out: 566out:
557 devtmpfs_mount("dev"); 567 devtmpfs_mount("dev");
558 sys_mount(".", "/", NULL, MS_MOVE, NULL); 568 sys_mount(".", "/", NULL, MS_MOVE, NULL);
559 sys_chroot((const char __user __force *)"."); 569 sys_chroot(".");
560} 570}