diff options
author | Namhyung Kim <namhyung@gmail.com> | 2010-10-26 17:22:42 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-10-26 19:52:15 -0400 |
commit | 562f5e638de4ef451226552fe8dd7847bacea24e (patch) | |
tree | 69a0ac78c9eca823a297c4b8e0810a5b1d4e3ee8 /init/do_mounts.c | |
parent | f0cfec11180973e4f4b2b6909623e47eaaf7ecfe (diff) |
init: mark __user address space on string literals
When calling syscall service routines in kernel, some of arguments should
be user pointers but were missing __user markup on string literals. Add
it. Removes some sparse warnings.
Signed-off-by: Namhyung Kim <namhyung@gmail.com>
Cc: Phillip Lougher <phillip@lougher.demon.co.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'init/do_mounts.c')
-rw-r--r-- | init/do_mounts.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/init/do_mounts.c b/init/do_mounts.c index 62a47eafa8e9..830aaec9c7d5 100644 --- a/init/do_mounts.c +++ b/init/do_mounts.c | |||
@@ -291,7 +291,7 @@ static int __init do_mount_root(char *name, char *fs, int flags, void *data) | |||
291 | if (err) | 291 | if (err) |
292 | return err; | 292 | return err; |
293 | 293 | ||
294 | sys_chdir("/root"); | 294 | sys_chdir((const char __user __force *)"/root"); |
295 | ROOT_DEV = current->fs->pwd.mnt->mnt_sb->s_dev; | 295 | ROOT_DEV = current->fs->pwd.mnt->mnt_sb->s_dev; |
296 | printk("VFS: Mounted root (%s filesystem)%s on device %u:%u.\n", | 296 | printk("VFS: Mounted root (%s filesystem)%s on device %u:%u.\n", |
297 | current->fs->pwd.mnt->mnt_sb->s_type->name, | 297 | current->fs->pwd.mnt->mnt_sb->s_type->name, |
@@ -488,5 +488,5 @@ void __init prepare_namespace(void) | |||
488 | out: | 488 | out: |
489 | devtmpfs_mount("dev"); | 489 | devtmpfs_mount("dev"); |
490 | sys_mount(".", "/", NULL, MS_MOVE, NULL); | 490 | sys_mount(".", "/", NULL, MS_MOVE, NULL); |
491 | sys_chroot("."); | 491 | sys_chroot((const char __user __force *)"."); |
492 | } | 492 | } |