diff --git a/mm/gup.c b/mm/gup.c index ce14d4d285030..a8336b39d6b5c 100644 --- a/mm/gup.c +++ b/mm/gup.c @@ -3080,7 +3080,7 @@ static int internal_get_user_pages_fast(unsigned long start, start = untagged_addr(start) & PAGE_MASK; len = nr_pages << PAGE_SHIFT; if (check_add_overflow(start, len, &end)) - return 0; + return -EOVERFLOW; if (end > TASK_SIZE_MAX) return -EFAULT; if (unlikely(!access_ok((void __user *)start, len)))