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
@@ -291,7 +291,7 @@ static int __init do_mount_root(char *name, char *fs, int flags, void *data)
|
||||
if (err)
|
||||
return err;
|
||||
|
||||
sys_chdir("/root");
|
||||
sys_chdir((const char __user __force *)"/root");
|
||||
ROOT_DEV = current->fs->pwd.mnt->mnt_sb->s_dev;
|
||||
printk("VFS: Mounted root (%s filesystem)%s on device %u:%u.\n",
|
||||
current->fs->pwd.mnt->mnt_sb->s_type->name,
|
||||
@@ -488,5 +488,5 @@ void __init prepare_namespace(void)
|
||||
out:
|
||||
devtmpfs_mount("dev");
|
||||
sys_mount(".", "/", NULL, MS_MOVE, NULL);
|
||||
sys_chroot(".");
|
||||
sys_chroot((const char __user __force *)".");
|
||||
}
|
||||
|
Reference in New Issue
Block a user