Skip to content

Commit 8b2a123

Browse files
author
Al Viro
committed
VM: can't go through the inner loop in unmap_vmas() more than once...
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
1 parent 038c7aa commit 8b2a123

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

mm/memory.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1354,7 +1354,7 @@ unsigned long unmap_vmas(struct mmu_gather *tlb,
13541354
if (unlikely(is_pfn_mapping(vma)))
13551355
untrack_pfn_vma(vma, 0, 0);
13561356

1357-
while (start != end) {
1357+
if (start != end) {
13581358
if (unlikely(is_vm_hugetlb_page(vma))) {
13591359
/*
13601360
* It is undesirable to test vma->vm_file as it
@@ -1371,8 +1371,8 @@ unsigned long unmap_vmas(struct mmu_gather *tlb,
13711371
unmap_hugepage_range(vma, start, end, NULL);
13721372
} else
13731373
unmap_page_range(tlb, vma, start, end, details);
1374-
start = end;
13751374
}
1375+
start = end;
13761376
}
13771377

13781378
mmu_notifier_invalidate_range_end(mm, start_addr, end_addr);

0 commit comments

Comments
 (0)