diff options
author | 2010-09-21 09:14:55 +0100 | |
---|---|---|
committer | 2010-09-21 09:14:55 +0100 | |
commit | db8c076b9206ea35b1f7299708d5510b17674db2 (patch) | |
tree | 7a5ee32db0c25bb29598c7c300ce7f2680f533a9 /mm | |
parent | drm/i915: Hold a reference to the object whilst unbinding the eviction list (diff) | |
parent | Linux 2.6.36-rc5 (diff) | |
download | linux-dev-db8c076b9206ea35b1f7299708d5510b17674db2.tar.xz linux-dev-db8c076b9206ea35b1f7299708d5510b17674db2.zip |
Merge remote branch 'linus' into drm-intel-fixes
Diffstat (limited to 'mm')
-rw-r--r-- | mm/memory.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/mm/memory.c b/mm/memory.c index 71b161b73bb5..0e18b4d649ec 100644 --- a/mm/memory.c +++ b/mm/memory.c @@ -2680,10 +2680,12 @@ static int do_swap_page(struct mm_struct *mm, struct vm_area_struct *vma, delayacct_clear_flag(DELAYACCT_PF_SWAPIN); /* - * Make sure try_to_free_swap didn't release the swapcache - * from under us. The page pin isn't enough to prevent that. + * Make sure try_to_free_swap or reuse_swap_page or swapoff did not + * release the swapcache from under us. The page pin, and pte_same + * test below, are not enough to exclude that. Even if it is still + * swapcache, we need to check that the page's swap has not changed. */ - if (unlikely(!PageSwapCache(page))) + if (unlikely(!PageSwapCache(page) || page_private(page) != entry.val)) goto out_page; if (ksm_might_need_to_copy(page, vma, address)) { |