patch-2.4.20 linux-2.4.20/mm/mmap.c

Next file: linux-2.4.20/mm/oom_kill.c
Previous file: linux-2.4.20/mm/memory.c
Back to the patch index
Back to the overall index

diff -urN linux-2.4.19/mm/mmap.c linux-2.4.20/mm/mmap.c
@@ -908,6 +908,7 @@
 	end_index = pgd_index(last);
 	if (end_index > start_index) {
 		clear_page_tables(mm, start_index, end_index - start_index);
+		flush_tlb_pgtables(mm, first & PGDIR_MASK, last & PGDIR_MASK);
 	}
 }
 
@@ -1152,13 +1153,14 @@
 		kmem_cache_free(vm_area_cachep, mpnt);
 		mpnt = next;
 	}
-	flush_tlb_mm(mm);
 
 	/* This is just debugging */
 	if (mm->map_count)
 		BUG();
 
 	clear_page_tables(mm, FIRST_USER_PGD_NR, USER_PTRS_PER_PGD);
+
+	flush_tlb_mm(mm);
 }
 
 /* Insert vm structure into process list sorted by address

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)