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
@@ -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);
|
||||
|
Reference in New Issue
Block a user