Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 335787
b: refs/heads/master
c: 1756954
h: refs/heads/master
i:
  335785: 475b700
  335783: 2ef2132
v: v3
  • Loading branch information
David Rientjes authored and Linus Torvalds committed Nov 16, 2012
1 parent eeed148 commit 73e941f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 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: 63c3b902e517012b127d6528434b928ceaa10f7b
refs/heads/master: 1756954c61cb5c97c618ccb366482b9c1f891d6d
10 changes: 4 additions & 6 deletions trunk/mm/memory.c
Original file line number Diff line number Diff line change
Expand Up @@ -2527,9 +2527,8 @@ static int do_wp_page(struct mm_struct *mm, struct vm_area_struct *vma,
int ret = 0;
int page_mkwrite = 0;
struct page *dirty_page = NULL;
unsigned long mmun_start; /* For mmu_notifiers */
unsigned long mmun_end; /* For mmu_notifiers */
bool mmun_called = false; /* For mmu_notifiers */
unsigned long mmun_start = 0; /* For mmu_notifiers */
unsigned long mmun_end = 0; /* For mmu_notifiers */

old_page = vm_normal_page(vma, address, orig_pte);
if (!old_page) {
Expand Down Expand Up @@ -2708,8 +2707,7 @@ static int do_wp_page(struct mm_struct *mm, struct vm_area_struct *vma,
goto oom_free_new;

mmun_start = address & PAGE_MASK;
mmun_end = (address & PAGE_MASK) + PAGE_SIZE;
mmun_called = true;
mmun_end = mmun_start + PAGE_SIZE;
mmu_notifier_invalidate_range_start(mm, mmun_start, mmun_end);

/*
Expand Down Expand Up @@ -2778,7 +2776,7 @@ static int do_wp_page(struct mm_struct *mm, struct vm_area_struct *vma,
page_cache_release(new_page);
unlock:
pte_unmap_unlock(page_table, ptl);
if (mmun_called)
if (mmun_end > mmun_start)
mmu_notifier_invalidate_range_end(mm, mmun_start, mmun_end);
if (old_page) {
/*
Expand Down

0 comments on commit 73e941f

Please sign in to comment.