--- linux-openmosix-test/linux-openmosix/mm/mremap.c Wed Jun 9 17:05:53 2004 +++ linux-openmosix-mod/linux-openmosix/mm/mremap.c Wed Jun 9 18:15:10 2004 @@ -80,12 +80,16 @@ static int move_one_page(struct mm_struct *mm, unsigned long old_addr, unsigned long new_addr) { int error = 0; - pte_t * src; + pte_t * src, * dst; spin_lock(&mm->page_table_lock); src = get_one_pte(mm, old_addr); - if (src) - error = copy_one_pte(mm, src, alloc_one_pte(mm, new_addr)); + if (src) { + dst = alloc_one_pte(mm, new_addr); + src = get_one_pte(mm, old_addr); + if (src) + error = copy_one_pte(mm, src, dst); + } spin_unlock(&mm->page_table_lock); return error; }