[PATCH] ksm: add update_mmu_cache() when changing pte mapping.

From: Izik Eidus
Date: Wed Sep 23 2009 - 15:37:34 EST


This patch add update_mmu_cache() call right after set_pte_at_notify()
Without this function ksm is probably broken for powerpc and sparc archs.

(Noticed by Hugh Dickins)

Signed-off-by: Izik Eidus <ieidus@xxxxxxxxxx>
---
mm/ksm.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/mm/ksm.c b/mm/ksm.c
index f7edac3..e8d16eb 100644
--- a/mm/ksm.c
+++ b/mm/ksm.c
@@ -719,6 +719,7 @@ static int replace_page(struct vm_area_struct *vma, struct page *oldpage,
flush_cache_page(vma, addr, pte_pfn(*ptep));
ptep_clear_flush(vma, addr, ptep);
set_pte_at_notify(mm, addr, ptep, mk_pte(newpage, prot));
+ update_mmu_cache(vma, addr, pte);

page_remove_rmap(oldpage);
put_page(oldpage);
--
1.5.6.5

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/