diff options
Diffstat (limited to 'arch/s390/mm/gup.c')
-rw-r--r-- | arch/s390/mm/gup.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/arch/s390/mm/gup.c b/arch/s390/mm/gup.c index 8b8285310b5a..1f5315d1215c 100644 --- a/arch/s390/mm/gup.c +++ b/arch/s390/mm/gup.c | |||
@@ -180,8 +180,7 @@ int __get_user_pages_fast(unsigned long start, int nr_pages, int write, | |||
180 | addr = start; | 180 | addr = start; |
181 | len = (unsigned long) nr_pages << PAGE_SHIFT; | 181 | len = (unsigned long) nr_pages << PAGE_SHIFT; |
182 | end = start + len; | 182 | end = start + len; |
183 | if (unlikely(!access_ok(write ? VERIFY_WRITE : VERIFY_READ, | 183 | if ((end < start) || (end > TASK_SIZE)) |
184 | (void __user *)start, len))) | ||
185 | return 0; | 184 | return 0; |
186 | 185 | ||
187 | local_irq_save(flags); | 186 | local_irq_save(flags); |
@@ -229,7 +228,7 @@ int get_user_pages_fast(unsigned long start, int nr_pages, int write, | |||
229 | addr = start; | 228 | addr = start; |
230 | len = (unsigned long) nr_pages << PAGE_SHIFT; | 229 | len = (unsigned long) nr_pages << PAGE_SHIFT; |
231 | end = start + len; | 230 | end = start + len; |
232 | if (end < start) | 231 | if ((end < start) || (end > TASK_SIZE)) |
233 | goto slow_irqon; | 232 | goto slow_irqon; |
234 | 233 | ||
235 | /* | 234 | /* |