]> git.karo-electronics.de Git - mv-sheeva.git/blobdiff - mm/memory.c
ksm: fix deadlock with munlock in exit_mmap
[mv-sheeva.git] / mm / memory.c
index f47ffe9710122451e065fcbdefdd4617fa7db4e5..05feaa11d87cea71a2672bf319fa80363fe46df7 100644 (file)
@@ -2648,7 +2648,7 @@ static int do_anonymous_page(struct mm_struct *mm, struct vm_area_struct *vma,
        entry = maybe_mkwrite(pte_mkdirty(entry), vma);
 
        page_table = pte_offset_map_lock(mm, pmd, address, &ptl);
-       if (!pte_none(*page_table) || ksm_test_exit(mm))
+       if (!pte_none(*page_table))
                goto release;
 
        inc_mm_counter(mm, anon_rss);
@@ -2792,7 +2792,7 @@ static int __do_fault(struct mm_struct *mm, struct vm_area_struct *vma,
         * handle that later.
         */
        /* Only go through if we didn't race with anybody else... */
-       if (likely(pte_same(*page_table, orig_pte) && !ksm_test_exit(mm))) {
+       if (likely(pte_same(*page_table, orig_pte))) {
                flush_icache_page(vma, page);
                entry = mk_pte(page, vma->vm_page_prot);
                if (flags & FAULT_FLAG_WRITE)