diff options
Diffstat (limited to 'mm/mincore.c')
-rw-r--r-- | mm/mincore.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/mm/mincore.c b/mm/mincore.c index 4985965aa20a..218099b5ed31 100644 --- a/mm/mincore.c +++ b/mm/mincore.c | |||
@@ -233,14 +233,14 @@ SYSCALL_DEFINE3(mincore, unsigned long, start, size_t, len, | |||
233 | return -EINVAL; | 233 | return -EINVAL; |
234 | 234 | ||
235 | /* ..and we need to be passed a valid user-space range */ | 235 | /* ..and we need to be passed a valid user-space range */ |
236 | if (!access_ok(VERIFY_READ, (void __user *) start, len)) | 236 | if (!access_ok((void __user *) start, len)) |
237 | return -ENOMEM; | 237 | return -ENOMEM; |
238 | 238 | ||
239 | /* This also avoids any overflows on PAGE_ALIGN */ | 239 | /* This also avoids any overflows on PAGE_ALIGN */ |
240 | pages = len >> PAGE_SHIFT; | 240 | pages = len >> PAGE_SHIFT; |
241 | pages += (offset_in_page(len)) != 0; | 241 | pages += (offset_in_page(len)) != 0; |
242 | 242 | ||
243 | if (!access_ok(VERIFY_WRITE, vec, pages)) | 243 | if (!access_ok(vec, pages)) |
244 | return -EFAULT; | 244 | return -EFAULT; |
245 | 245 | ||
246 | tmp = (void *) __get_free_page(GFP_USER); | 246 | tmp = (void *) __get_free_page(GFP_USER); |