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>
This commit is contained in:
Namhyung Kim
2010-10-26 14:22:42 -07:00
committed by Linus Torvalds
parent f0cfec1118
commit 562f5e638d
5 changed files with 11 additions and 10 deletions

View File

@@ -29,17 +29,17 @@ static int __init default_rootfs(void)
{
int err;
err = sys_mkdir("/dev", 0755);
err = sys_mkdir((const char __user __force *) "/dev", 0755);
if (err < 0)
goto out;
err = sys_mknod((const char __user *) "/dev/console",
err = sys_mknod((const char __user __force *) "/dev/console",
S_IFCHR | S_IRUSR | S_IWUSR,
new_encode_dev(MKDEV(5, 1)));
if (err < 0)
goto out;
err = sys_mkdir("/root", 0700);
err = sys_mkdir((const char __user __force *) "/root", 0700);
if (err < 0)
goto out;