projects
/
linux-2.6-microblaze.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
sched: Prevent balance_push() on remote runqueues
[linux-2.6-microblaze.git]
/
mm
/
gup.c
diff --git
a/mm/gup.c
b/mm/gup.c
index
42b8b1f
..
b947179
100644
(file)
--- a/
mm/gup.c
+++ b/
mm/gup.c
@@
-1558,9
+1558,12
@@
long faultin_vma_page_range(struct vm_area_struct *vma, unsigned long start,
gup_flags |= FOLL_WRITE;
/*
gup_flags |= FOLL_WRITE;
/*
- *
See check_vma_flags(): Will return -EFAULT on incompatible mappings
- *
or with insufficient permission
s.
+ *
We want to report -EINVAL instead of -EFAULT for any permission
+ *
problems or incompatible mapping
s.
*/
*/
+ if (check_vma_flags(vma, gup_flags))
+ return -EINVAL;
+
return __get_user_pages(mm, start, nr_pages, gup_flags,
NULL, NULL, locked);
}
return __get_user_pages(mm, start, nr_pages, gup_flags,
NULL, NULL, locked);
}