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:

committed by
Linus Torvalds

parent
f0cfec1118
commit
562f5e638d
@@ -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;
|
||||
|
||||
|
Reference in New Issue
Block a user