aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--mm/mprotect.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/mm/mprotect.c b/mm/mprotect.c
index ec39f730a0bf..58b629bb70de 100644
--- a/mm/mprotect.c
+++ b/mm/mprotect.c
@@ -166,7 +166,7 @@ static inline unsigned long change_pmd_range(struct vm_area_struct *vma,
166 next = pmd_addr_end(addr, end); 166 next = pmd_addr_end(addr, end);
167 if (!is_swap_pmd(*pmd) && !pmd_trans_huge(*pmd) && !pmd_devmap(*pmd) 167 if (!is_swap_pmd(*pmd) && !pmd_trans_huge(*pmd) && !pmd_devmap(*pmd)
168 && pmd_none_or_clear_bad(pmd)) 168 && pmd_none_or_clear_bad(pmd))
169 continue; 169 goto next;
170 170
171 /* invoke the mmu notifier if the pmd is populated */ 171 /* invoke the mmu notifier if the pmd is populated */
172 if (!mni_start) { 172 if (!mni_start) {
@@ -188,7 +188,7 @@ static inline unsigned long change_pmd_range(struct vm_area_struct *vma,
188 } 188 }
189 189
190 /* huge pmd was handled */ 190 /* huge pmd was handled */
191 continue; 191 goto next;
192 } 192 }
193 } 193 }
194 /* fall through, the trans huge pmd just split */ 194 /* fall through, the trans huge pmd just split */
@@ -196,6 +196,8 @@ static inline unsigned long change_pmd_range(struct vm_area_struct *vma,
196 this_pages = change_pte_range(vma, pmd, addr, next, newprot, 196 this_pages = change_pte_range(vma, pmd, addr, next, newprot,
197 dirty_accountable, prot_numa); 197 dirty_accountable, prot_numa);
198 pages += this_pages; 198 pages += this_pages;
199next:
200 cond_resched();
199 } while (pmd++, addr = next, addr != end); 201 } while (pmd++, addr = next, addr != end);
200 202
201 if (mni_start) 203 if (mni_start)