diff options
Diffstat (limited to 'init/do_mounts_rd.c')
-rw-r--r-- | init/do_mounts_rd.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/init/do_mounts_rd.c b/init/do_mounts_rd.c index 6212586df29a..6be2879cca66 100644 --- a/init/do_mounts_rd.c +++ b/init/do_mounts_rd.c | |||
@@ -1,3 +1,12 @@ | |||
1 | /* | ||
2 | * Many of the syscalls used in this file expect some of the arguments | ||
3 | * to be __user pointers not __kernel pointers. To limit the sparse | ||
4 | * noise, turn off sparse checking for this file. | ||
5 | */ | ||
6 | #ifdef __CHECKER__ | ||
7 | #undef __CHECKER__ | ||
8 | #warning "Sparse checking disabled for this file" | ||
9 | #endif | ||
1 | 10 | ||
2 | #include <linux/kernel.h> | 11 | #include <linux/kernel.h> |
3 | #include <linux/fs.h> | 12 | #include <linux/fs.h> |
@@ -181,7 +190,7 @@ int __init rd_load_image(char *from) | |||
181 | char rotator[4] = { '|' , '/' , '-' , '\\' }; | 190 | char rotator[4] = { '|' , '/' , '-' , '\\' }; |
182 | #endif | 191 | #endif |
183 | 192 | ||
184 | out_fd = sys_open((const char __user __force *) "/dev/ram", O_RDWR, 0); | 193 | out_fd = sys_open("/dev/ram", O_RDWR, 0); |
185 | if (out_fd < 0) | 194 | if (out_fd < 0) |
186 | goto out; | 195 | goto out; |
187 | 196 | ||
@@ -280,7 +289,7 @@ noclose_input: | |||
280 | sys_close(out_fd); | 289 | sys_close(out_fd); |
281 | out: | 290 | out: |
282 | kfree(buf); | 291 | kfree(buf); |
283 | sys_unlink((const char __user __force *) "/dev/ram"); | 292 | sys_unlink("/dev/ram"); |
284 | return res; | 293 | return res; |
285 | } | 294 | } |
286 | 295 | ||