Message ID | 20210311000616.GIEHU6C1Q%akpm@linux-foundation.org |
---|---|
State | New |
Headers | show |
Series | + mm-oom_kill-ensure-mmu-notifier-range_end-is-paired-with-range_start.patch added to -mm tree | expand |
On Wed, Mar 10, 2021 at 04:06:16PM -0800, akpm@linux-foundation.org wrote: > > The patch titled > Subject: mm/oom_kill: ensure MMU notifier range_end() is paired with range_start() > has been added to the -mm tree. Its filename is > mm-oom_kill-ensure-mmu-notifier-range_end-is-paired-with-range_start.patch Let's please wait till the discussion settles, to my mind this patch is not an improvement. Thanks, Jason
--- a/mm/oom_kill.c~mm-oom_kill-ensure-mmu-notifier-range_end-is-paired-with-range_start +++ a/mm/oom_kill.c @@ -546,12 +546,10 @@ bool __oom_reap_task_mm(struct mm_struct vma, mm, vma->vm_start, vma->vm_end); tlb_gather_mmu(&tlb, mm); - if (mmu_notifier_invalidate_range_start_nonblock(&range)) { - tlb_finish_mmu(&tlb); + if (!mmu_notifier_invalidate_range_start_nonblock(&range)) + unmap_page_range(&tlb, vma, range.start, range.end, NULL); + else ret = false; - continue; - } - unmap_page_range(&tlb, vma, range.start, range.end, NULL); mmu_notifier_invalidate_range_end(&range); tlb_finish_mmu(&tlb); }