The patch titled swapless page migration: fix fork corruption has been removed from the -mm tree. Its filename is swapless-pm-add-r-w-migration-entries-fix-2.patch This patch was probably dropped from -mm because it has now been merged into a subsystem tree or into Linus's tree, or because it was folded into its parent patch in the -mm tree. ------------------------------------------------------ Subject: swapless page migration: fix fork corruption From: Hugh Dickins <hugh@xxxxxxxxxxx> Several times while testing swapless page migration, gcc has tried to exec a pointer instead of a string: smells like COW mappings are not being properly write-protected on fork. The protection in copy_one_pte looks very convincing, until at last you realize that the second arg to make_migration_entry is a boolean "write", and SWP_MIGRATION_READ is 30. Anyway, it's better done like in change_pte_range, using is_write_migration_entry and make_migration_entry_read. Signed-off-by: Hugh Dickins <hugh@xxxxxxxxxxx> Acked-by: Christoph Lameter <clameter@xxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxx> --- mm/memory.c | 9 +++------ 1 files changed, 3 insertions(+), 6 deletions(-) diff -puN mm/memory.c~swapless-pm-add-r-w-migration-entries-fix-2 mm/memory.c --- 25/mm/memory.c~swapless-pm-add-r-w-migration-entries-fix-2 Fri May 26 13:20:14 2006 +++ 25-akpm/mm/memory.c Fri May 26 13:20:14 2006 @@ -445,16 +445,13 @@ copy_one_pte(struct mm_struct *dst_mm, s &src_mm->mmlist); spin_unlock(&mmlist_lock); } - if (is_migration_entry(entry) && + if (is_write_migration_entry(entry) && is_cow_mapping(vm_flags)) { - page = migration_entry_to_page(entry); - /* * COW mappings require pages in both parent - * and child to be set to read. + * and child to be set to read. */ - entry = make_migration_entry(page, - SWP_MIGRATION_READ); + make_migration_entry_read(&entry); pte = swp_entry_to_pte(entry); set_pte_at(src_mm, addr, src_pte, pte); } _ Patches currently in -mm which might be from hugh@xxxxxxxxxxx are mm-vm_bug_on.patch page-migration-make-do_swap_page-redo-the-fault.patch migration-remove-unnecessary-pageswapcache-checks.patch swapless-pm-add-r-w-migration-entries.patch swapless-pm-add-r-w-migration-entries-fix-2.patch add-page_mkwrite-vm_operations-method.patch mm-remove-vm_locked-before-remap_pfn_range-and-drop-vm_shm.patch swapoff-atomic_inc_not_zero-on-mm_users.patch remove-unused-o_flags-from-do_shmat.patch fix-update_mmu_cache-in-fremapc.patch fix-update_mmu_cache-in-fremapc-fix.patch page-migration-simplify-migrate_pages.patch page-migration-simplify-migrate_pages-tweaks.patch page-migration-handle-freeing-of-pages-in-migrate_pages.patch page-migration-use-allocator-function-for-migrate_pages.patch page-migration-support-moving-of-individual-pages.patch page-migration-detailed-status-for-moving-of-individual-pages.patch page-migration-support-moving-of-individual-pages-fixes.patch page-migration-support-a-vma-migration-function.patch allow-migration-of-mlocked-pages.patch - To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html