Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 272138
b: refs/heads/master
c: ebed484
h: refs/heads/master
v: v3
  • Loading branch information
Andrea Arcangeli authored and Linus Torvalds committed Nov 1, 2011
1 parent 76ab279 commit 8f432a0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 6661672053aee709d93f5dbd7887c789364c11d4
refs/heads/master: ebed48460be5abd86d9a24fa7c66378e58109f30
5 changes: 3 additions & 2 deletions trunk/mm/mremap.c
Original file line number Diff line number Diff line change
Expand Up @@ -141,9 +141,10 @@ unsigned long move_page_tables(struct vm_area_struct *vma,
for (; old_addr < old_end; old_addr += extent, new_addr += extent) {
cond_resched();
next = (old_addr + PMD_SIZE) & PMD_MASK;
if (next - 1 > old_end)
next = old_end;
/* even if next overflowed, extent below will be ok */
extent = next - old_addr;
if (extent > old_end - old_addr)
extent = old_end - old_addr;
old_pmd = get_old_pmd(vma->vm_mm, old_addr);
if (!old_pmd)
continue;
Expand Down

0 comments on commit 8f432a0

Please sign in to comment.