Fix unmap_page_range again for shared page tables
Subsystems (3)
PATCH 1/1 Fix unmap_page_range again for shared page tables
My previous attempt at getting unmap_page_range right had a bad race condition. Here's a patch that should resolve it correctly.
This patch applies on top of the patch I sent earlier in the day.
Dave McCracken
======================================================================
Dave McCracken IBM Linux Base Kernel Team 1-512-838-3059
[email protected] T/L 678-3059
./mm/mmap.c +2 -6
@@ -23,7 +23,7 @@#include <asm/pgalloc.h> #include <asm/tlb.h> -extern void unmap_page_range (mmu_gather_t *,struct vm_area_struct *vma,unsigned long address,unsigned long size); +extern void unmap_page_range (mmu_gather_t **,struct vm_area_struct *vma,unsigned long address,unsigned long size);#ifdef CONFIG_SHAREPTE extern void unmap_shared_range (struct mm_struct *mm,unsigned long address,unsigned long end);#endif
@@ -994,10 +994,6 @@ {mmu_gather_t *tlb; -#ifdef CONFIG_SHAREPTE -/* Make sure all the pte pages in the range are unshared if necessary */ -unmap_shared_range (mm, start, end); -#endif tlb =tlb_gather_mmu (mm,0 ); do {
@@ -1006,7 +1002,7 @@ from = start < mpnt->vm_start ? mpnt->vm_start : start; to = end > mpnt->vm_end ? mpnt->vm_end : end; -unmap_page_range (tlb, mpnt, from, to); +unmap_page_range (&tlb, mpnt, from, to);if (mpnt->vm_flags &VM_ACCOUNT ) { len = to - from;
./mm/memory.c +35 -87
177 lines not on this page · raw message