Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 211225
b: refs/heads/master
c: 4829b90
h: refs/heads/master
i:
  211223: 03a6952
v: v3
  • Loading branch information
Hugh Dickins authored and Linus Torvalds committed Oct 4, 2010
1 parent 1b29b8a commit a457b84
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: c6ea21e35bf3691cad59647c771e6606067f627d
refs/heads/master: 4829b906cc063cb7cd1b7f34fa05de6db75ec8bb
8 changes: 7 additions & 1 deletion trunk/mm/rmap.c
Original file line number Diff line number Diff line change
Expand Up @@ -381,7 +381,13 @@ 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)) {
if (vma->anon_vma->root != page_anon_vma(page)->root)
struct anon_vma *page__anon_vma = page_anon_vma(page);
/*
* Note: swapoff's unuse_vma() is more efficient with this
* check, and needs it to match anon_vma when KSM is active.
*/
if (!vma->anon_vma || !page__anon_vma ||
vma->anon_vma->root != page__anon_vma->root)
return -EFAULT;
} else if (page->mapping && !(vma->vm_flags & VM_NONLINEAR)) {
if (!vma->vm_file ||
Expand Down

0 comments on commit a457b84

Please sign in to comment.