Loading mm/memory.c +10 −0 Original line number Diff line number Diff line Loading @@ -934,6 +934,7 @@ static int copy_pte_range(struct mm_struct *dst_mm, struct mm_struct *src_mm, spinlock_t *src_ptl, *dst_ptl; int progress = 0; int rss[NR_MM_COUNTERS]; unsigned long orig_addr = addr; swp_entry_t entry = (swp_entry_t){0}; again: Loading Loading @@ -972,6 +973,15 @@ static int copy_pte_range(struct mm_struct *dst_mm, struct mm_struct *src_mm, } while (dst_pte++, src_pte++, addr += PAGE_SIZE, addr != end); arch_leave_lazy_mmu_mode(); /* * Prevent the page fault handler to copy the page while stale tlb entry * are still not flushed. */ if (IS_ENABLED(CONFIG_SPECULATIVE_PAGE_FAULT) && is_cow_mapping(vma->vm_flags)) flush_tlb_range(vma, orig_addr, end); spin_unlock(src_ptl); pte_unmap(orig_src_pte); add_mm_rss_vec(dst_mm, rss); Loading Loading
mm/memory.c +10 −0 Original line number Diff line number Diff line Loading @@ -934,6 +934,7 @@ static int copy_pte_range(struct mm_struct *dst_mm, struct mm_struct *src_mm, spinlock_t *src_ptl, *dst_ptl; int progress = 0; int rss[NR_MM_COUNTERS]; unsigned long orig_addr = addr; swp_entry_t entry = (swp_entry_t){0}; again: Loading Loading @@ -972,6 +973,15 @@ static int copy_pte_range(struct mm_struct *dst_mm, struct mm_struct *src_mm, } while (dst_pte++, src_pte++, addr += PAGE_SIZE, addr != end); arch_leave_lazy_mmu_mode(); /* * Prevent the page fault handler to copy the page while stale tlb entry * are still not flushed. */ if (IS_ENABLED(CONFIG_SPECULATIVE_PAGE_FAULT) && is_cow_mapping(vma->vm_flags)) flush_tlb_range(vma, orig_addr, end); spin_unlock(src_ptl); pte_unmap(orig_src_pte); add_mm_rss_vec(dst_mm, rss); Loading