fs/proc/task_mmu: Fix pte update and tlb maintenance ordering in pagemap_scan_pmd_entry()
pagemap_scan_pmd_entry() was previously modifying ptes while in lazy mmu mode, then performing tlb maintenance for the modified ptes, then leaving lazy mmu mode. But any pte modifications during lazy mmu mode may be deferred until arch_leave_lazy_mmu_mode(), inverting the required ordering between pte modificaiton and tlb maintenance. Let's fix that by leaving mmu mode, forcing all the pte updates to be actioned, before doing the tlb maintenance. This is a theorectical bug discovered during code review. Fixes: 52526ca7 ("fs/proc/task_mmu: implement IOCTL to get and optionally clear info about PTEs") Signed-off-by:Ryan Roberts <ryan.roberts@arm.com>
Loading
Please register or sign in to comment