Message ID | 20221122061910.64510-2-cengiz.can@canonical.com |
---|---|
State | New |
Headers | show |
Series | [SRU,Bionic] mm/mremap: hold the rmap lock in write mode when moving page table entries. | expand |
diff --git a/mm/mremap.c b/mm/mremap.c index 2bdb255cde9a9..473cf0e4c5f13 100644 --- a/mm/mremap.c +++ b/mm/mremap.c @@ -230,12 +230,10 @@ unsigned long move_page_tables(struct vm_area_struct *vma, if (extent == HPAGE_PMD_SIZE) { bool moved; /* See comment in move_ptes() */ - if (need_rmap_locks) - take_rmap_locks(vma); + take_rmap_locks(vma); moved = move_huge_pmd(vma, old_addr, new_addr, old_end, old_pmd, new_pmd); - if (need_rmap_locks) - drop_rmap_locks(vma); + drop_rmap_locks(vma); if (moved) continue; }