rmap: do not call mmu_notifier_invalidate_page() under ptl
authorKirill A. Shutemov <[email protected]>
Thu, 10 Aug 2017 22:24:27 +0000 (15:24 -0700)
committerLinus Torvalds <[email protected]>
Thu, 10 Aug 2017 22:54:07 +0000 (15:54 -0700)
commitaac2fea94f7a3df8ad1eeb477eb2643f81fd5393
tree95ee6a145bf9308130fc0c672c968bc73458f8e1
parentd041353dc98a6339182cd6f628b4c8f111278cb3
rmap: do not call mmu_notifier_invalidate_page() under ptl

MMU notifiers can sleep, but in page_mkclean_one() we call
mmu_notifier_invalidate_page() under page table lock.

Let's instead use mmu_notifier_invalidate_range() outside
page_vma_mapped_walk() loop.

[[email protected]: try_to_unmap_one() do not call mmu_notifier under ptl]
Link: http://lkml.kernel.org/r/[email protected]
Link: http://lkml.kernel.org/r/[email protected]
Fixes: c7ab0d2fdc84 ("mm: convert try_to_unmap_one() to use page_vma_mapped_walk()")
Signed-off-by: Kirill A. Shutemov <[email protected]>
Signed-off-by: Jérôme Glisse <[email protected]>
Reported-by: axie <[email protected]>
Cc: Alex Deucher <[email protected]>
Cc: "Writer, Tim" <[email protected]>
Cc: <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
mm/rmap.c