On 05/30, Lorenzo Stoakes wrote:
--- a/mm/mremap.c +++ b/mm/mremap.c @@ -237,6 +237,8 @@ static int move_ptes(struct pagetable_move_control *pmc,
for (; old_addr < old_end; old_pte++, old_addr += PAGE_SIZE, new_pte++, new_addr += PAGE_SIZE) {
WARN_ON_ONCE(!pte_none(*new_pte));
I mean, we really really should not ever be seeing a mapped PTE here, so I think a WARN_ON_ONCE() is fine.
We unmap anything ahead of time, and only I think this uprobe breakpoint installation would ever cause this to be the case.
We can make this a VM_WARN_ON_ONCE() too I suppose, just in case there's something we're not thinking of, but I'd say at some point we'd want to change it to a WARN_ON_ONCE().
Note also that move_normal_pmd/move_normal_pud use WARN_ON_ONCE(!xxx_none(...)), not VM_WARN_ON_ONCE().
Oleg.