diff --git a/mm/mmap.c b/mm/mmap.c index 8c6ed06983f9e..724b7c4f1a5b5 100644 --- a/mm/mmap.c +++ b/mm/mmap.c @@ -3065,6 +3065,7 @@ void exit_mmap(struct mm_struct *mm) if (vma->vm_flags & VM_ACCOUNT) nr_accounted += vma_pages(vma); vma = remove_vma(vma); + cond_resched(); } vm_unacct_memory(nr_accounted); }