Skip to content

Commit 02129e6

Browse files
mitaakpm00
authored andcommitted
mm/damon/vaddr: fix missing pte_unmap_unlock in damos_va_migrate_pmd_entry()
If the PTE page table lock is acquired by pte_offset_map_lock(), the lock must be released via pte_unmap_unlock(). However, in damos_va_migrate_pmd_entry(), if damos_va_filter_out() returns true, it immediately returns without releasing the lock. This fixes the issue by not stopping page table traversal when damos_va_filter_out() returns true and ensuring that the lock is released. Link: https://lkml.kernel.org/r/20251209151034.77221-1-akinobu.mita@gmail.com Fixes: 09efc56 ("mm/damon/vaddr: consistently use only pmd_entry for damos_migrate") Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com> Reviewed-by: SeongJae Park <sj@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
1 parent 612b595 commit 02129e6

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

mm/damon/vaddr.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -743,7 +743,7 @@ static int damos_va_migrate_pmd_entry(pmd_t *pmd, unsigned long addr,
743743
if (!folio)
744744
continue;
745745
if (damos_va_filter_out(s, folio, walk->vma, addr, pte, NULL))
746-
return 0;
746+
continue;
747747
damos_va_migrate_dests_add(folio, walk->vma, addr, dests,
748748
migration_lists);
749749
nr = folio_nr_pages(folio);

0 commit comments

Comments
 (0)