aboutsummaryrefslogtreecommitdiffstats
path: root/init/do_mounts_rd.c
diff options
context:
space:
mode:
authorNamhyung Kim <namhyung@gmail.com>2010-10-26 17:22:42 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2010-10-26 19:52:15 -0400
commit562f5e638de4ef451226552fe8dd7847bacea24e (patch)
tree69a0ac78c9eca823a297c4b8e0810a5b1d4e3ee8 /init/do_mounts_rd.c
parentf0cfec11180973e4f4b2b6909623e47eaaf7ecfe (diff)
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>
Diffstat (limited to 'init/do_mounts_rd.c')
-rw-r--r--init/do_mounts_rd.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/init/do_mounts_rd.c b/init/do_mounts_rd.c
index bf3ef667bf36..6e1ee6987c78 100644
--- a/init/do_mounts_rd.c
+++ b/init/do_mounts_rd.c
@@ -168,7 +168,7 @@ int __init rd_load_image(char *from)
168 char rotator[4] = { '|' , '/' , '-' , '\\' }; 168 char rotator[4] = { '|' , '/' , '-' , '\\' };
169#endif 169#endif
170 170
171 out_fd = sys_open("/dev/ram", O_RDWR, 0); 171 out_fd = sys_open((const char __user __force *) "/dev/ram", O_RDWR, 0);
172 if (out_fd < 0) 172 if (out_fd < 0)
173 goto out; 173 goto out;
174 174
@@ -267,7 +267,7 @@ noclose_input:
267 sys_close(out_fd); 267 sys_close(out_fd);
268out: 268out:
269 kfree(buf); 269 kfree(buf);
270 sys_unlink("/dev/ram"); 270 sys_unlink((const char __user __force *) "/dev/ram");
271 return res; 271 return res;
272} 272}
273 273