projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
288468c
)
rmap: resurrect page_address_in_vma anon_vma check
author
Andrea Arcangeli
<
[email protected]
>
Tue, 10 Aug 2010 00:19:10 +0000
(17:19 -0700)
committer
Linus Torvalds
<
[email protected]
>
Tue, 10 Aug 2010 03:44:59 +0000
(20:44 -0700)
With root anon-vma it's trivial to keep doing the usual check as in
old-anon-vma code.
Signed-off-by: Andrea Arcangeli <
[email protected]
>
Signed-off-by: Rik van Riel <
[email protected]
>
Signed-off-by: Andrew Morton <
[email protected]
>
Signed-off-by: Linus Torvalds <
[email protected]
>
mm/rmap.c
patch
|
blob
|
history
diff --git
a/mm/rmap.c
b/mm/rmap.c
index f5d6799b8a744356873c4e20b67ee492b06c6dc3..2f855babfd060a52943b40a728a3c9e4c1278b3c 100644
(file)
--- a/
mm/rmap.c
+++ b/
mm/rmap.c
@@
-364,9
+364,10
@@
vma_address(struct page *page, struct vm_area_struct *vma)
*/
unsigned long page_address_in_vma(struct page *page, struct vm_area_struct *vma)
{
- if (PageAnon(page))
- ;
- else if (page->mapping && !(vma->vm_flags & VM_NONLINEAR)) {
+ if (PageAnon(page)) {
+ if (vma->anon_vma->root != page_anon_vma(page)->root)
+ return -EFAULT;
+ } else if (page->mapping && !(vma->vm_flags & VM_NONLINEAR)) {
if (!vma->vm_file ||
vma->vm_file->f_mapping != page->mapping)
return -EFAULT;