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

@@ -283,7 +283,7 @@ static void __init autodetect_raid(void)
wait_for_device_probe();
fd = sys_open("/dev/md0", 0, 0);
fd = sys_open((const char __user __force *) "/dev/md0", 0, 0);
if (fd >= 0) {
sys_ioctl(fd, RAID_AUTORUN, raid_autopart);
sys_close(fd);