Skip to content

Commit

Permalink
mm/memory.c: initialise mmu_notifier_range correctly
Browse files Browse the repository at this point in the history
One of the paths in follow_pte_pmd() initialised the mmu_notifier_range
incorrectly.

Link: http://lkml.kernel.org/r/[email protected]
Fixes: ac46d4f ("mm/mmu_notifier: use structure for invalidate_range_start/end calls v2")
Signed-off-by: Matthew Wilcox <[email protected]>
Tested-by: Dave Chinner <[email protected]>
Reviewed-by: Jérôme Glisse <[email protected]>
Cc: John Hubbard <[email protected]>
Cc: Jan Kara <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
Matthew Wilcox authored and torvalds committed Jan 9, 2019
1 parent aff876d commit 1ed7293
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions mm/memory.c
Original file line number Diff line number Diff line change
Expand Up @@ -4099,8 +4099,8 @@ static int __follow_pte_pmd(struct mm_struct *mm, unsigned long address,
goto out;

if (range) {
range->start = address & PAGE_MASK;
range->end = range->start + PAGE_SIZE;
mmu_notifier_range_init(range, mm, address & PAGE_MASK,
(address & PAGE_MASK) + PAGE_SIZE);
mmu_notifier_invalidate_range_start(range);
}
ptep = pte_offset_map_lock(mm, pmd, address, ptlp);
Expand Down

0 comments on commit 1ed7293

Please sign in to comment.