diff options
Diffstat (limited to 'arch/mips/mm')
| -rw-r--r-- | arch/mips/mm/cache.c | 2 | ||||
| -rw-r--r-- | arch/mips/mm/gup.c | 3 |
2 files changed, 2 insertions, 3 deletions
diff --git a/arch/mips/mm/cache.c b/arch/mips/mm/cache.c index 70a523151ff3..55099fbff4e6 100644 --- a/arch/mips/mm/cache.c +++ b/arch/mips/mm/cache.c | |||
| @@ -76,7 +76,7 @@ SYSCALL_DEFINE3(cacheflush, unsigned long, addr, unsigned long, bytes, | |||
| 76 | { | 76 | { |
| 77 | if (bytes == 0) | 77 | if (bytes == 0) |
| 78 | return 0; | 78 | return 0; |
| 79 | if (!access_ok(VERIFY_WRITE, (void __user *) addr, bytes)) | 79 | if (!access_ok((void __user *) addr, bytes)) |
| 80 | return -EFAULT; | 80 | return -EFAULT; |
| 81 | 81 | ||
| 82 | __flush_icache_user_range(addr, addr + bytes); | 82 | __flush_icache_user_range(addr, addr + bytes); |
diff --git a/arch/mips/mm/gup.c b/arch/mips/mm/gup.c index 5a4875cac1ec..0d14e0d8eacf 100644 --- a/arch/mips/mm/gup.c +++ b/arch/mips/mm/gup.c | |||
| @@ -195,8 +195,7 @@ int __get_user_pages_fast(unsigned long start, int nr_pages, int write, | |||
| 195 | addr = start; | 195 | addr = start; |
| 196 | len = (unsigned long) nr_pages << PAGE_SHIFT; | 196 | len = (unsigned long) nr_pages << PAGE_SHIFT; |
| 197 | end = start + len; | 197 | end = start + len; |
| 198 | if (unlikely(!access_ok(write ? VERIFY_WRITE : VERIFY_READ, | 198 | if (unlikely(!access_ok((void __user *)start, len))) |
| 199 | (void __user *)start, len))) | ||
| 200 | return 0; | 199 | return 0; |
| 201 | 200 | ||
| 202 | /* | 201 | /* |
