projects
/
platform
/
kernel
/
linux-starfive.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
riscv: Add new csr defines related to vector extension
[platform/kernel/linux-starfive.git]
/
mm
/
gup.c
diff --git
a/mm/gup.c
b/mm/gup.c
index
ff689c8
..
bbe4162
100644
(file)
--- a/
mm/gup.c
+++ b/
mm/gup.c
@@
-2970,6
+2970,8
@@
static int internal_get_user_pages_fast(unsigned long start,
len = nr_pages << PAGE_SHIFT;
if (check_add_overflow(start, len, &end))
return 0;
+ if (end > TASK_SIZE_MAX)
+ return -EFAULT;
if (unlikely(!access_ok((void __user *)start, len)))
return -EFAULT;