diff options
author | Linus Walleij <linus.walleij@linaro.org> | 2013-10-08 07:27:11 -0400 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2013-10-08 07:27:11 -0400 |
commit | bfabb59433fc18ff78d2818e10e212d0f85d56ae (patch) | |
tree | dd7cbead179c09c62627a84c16c802d99095ba6e /mm/mlock.c | |
parent | 6a08a92ec45782e5543addf5f8785e2560a078f6 (diff) | |
parent | d0e639c9e06d44e713170031fe05fb60ebe680af (diff) |
Merge tag 'v3.12-rc4' into devel
Linux 3.12-rc4
Diffstat (limited to 'mm/mlock.c')
-rw-r--r-- | mm/mlock.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/mm/mlock.c b/mm/mlock.c index d63802663242..d480cd6fc475 100644 --- a/mm/mlock.c +++ b/mm/mlock.c | |||
@@ -379,10 +379,14 @@ static unsigned long __munlock_pagevec_fill(struct pagevec *pvec, | |||
379 | 379 | ||
380 | /* | 380 | /* |
381 | * Initialize pte walk starting at the already pinned page where we | 381 | * Initialize pte walk starting at the already pinned page where we |
382 | * are sure that there is a pte. | 382 | * are sure that there is a pte, as it was pinned under the same |
383 | * mmap_sem write op. | ||
383 | */ | 384 | */ |
384 | pte = get_locked_pte(vma->vm_mm, start, &ptl); | 385 | pte = get_locked_pte(vma->vm_mm, start, &ptl); |
385 | end = min(end, pmd_addr_end(start, end)); | 386 | /* Make sure we do not cross the page table boundary */ |
387 | end = pgd_addr_end(start, end); | ||
388 | end = pud_addr_end(start, end); | ||
389 | end = pmd_addr_end(start, end); | ||
386 | 390 | ||
387 | /* The page next to the pinned page is the first we will try to get */ | 391 | /* The page next to the pinned page is the first we will try to get */ |
388 | start += PAGE_SIZE; | 392 | start += PAGE_SIZE; |
@@ -736,6 +740,7 @@ static int do_mlockall(int flags) | |||
736 | 740 | ||
737 | /* Ignore errors */ | 741 | /* Ignore errors */ |
738 | mlock_fixup(vma, &prev, vma->vm_start, vma->vm_end, newflags); | 742 | mlock_fixup(vma, &prev, vma->vm_start, vma->vm_end, newflags); |
743 | cond_resched(); | ||
739 | } | 744 | } |
740 | out: | 745 | out: |
741 | return 0; | 746 | return 0; |