The patch titled Subject: mm-vmscan-use-vma-iterator-instead-of-vm_next-fix has been added to the -mm mm-unstable branch. Its filename is mm-vmscan-use-vma-iterator-instead-of-vm_next-fix.patch This patch will shortly appear at https://git.kernel.org/pub/scm/linux/kernel/git/akpm/25-new.git/tree/patches/mm-vmscan-use-vma-iterator-instead-of-vm_next-fix.patch This patch will later appear in the mm-unstable branch at git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/process/submit-checklist.rst when testing your code *** The -mm tree is included into linux-next via the mm-everything branch at git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm and is updated there every 2-3 working days ------------------------------------------------------ From: Yu Zhao <yuzhao@xxxxxxxxxx> Subject: mm-vmscan-use-vma-iterator-instead-of-vm_next-fix Date: Mon, 12 Sep 2022 14:01:28 -0600 changelog goes here Link: https://lkml.kernel.org/r/Yx+QGOgHg1Wk8tGK@xxxxxxxxxx Signed-off-by: Yu Zhao <yuzhao@xxxxxxxxxx> Cc: Liam Howlett <liam.howlett@xxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- mm/vmscan.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) --- a/mm/vmscan.c~mm-vmscan-use-vma-iterator-instead-of-vm_next-fix +++ a/mm/vmscan.c @@ -3781,7 +3781,10 @@ static bool get_next_vma(unsigned long m VM_WARN_ON_ONCE(mask & size); VM_WARN_ON_ONCE((start & mask) != (*vm_start & mask)); - for_each_vma_range(vmi, args->vma, end) { + for_each_vma(vmi, args->vma) { + if (end && end <= args->vma->vm_start) + return false; + if (should_skip_vma(args->vma->vm_start, args->vma->vm_end, args)) continue; _ Patches currently in -mm which might be from yuzhao@xxxxxxxxxx are mm-x86-arm64-add-arch_has_hw_pte_young.patch mm-x86-add-config_arch_has_nonleaf_pmd_young.patch mm-vmscanc-refactor-shrink_node.patch revert-include-linux-mm_inlineh-fold-__update_lru_size-into-its-sole-caller.patch mm-multi-gen-lru-groundwork.patch mm-multi-gen-lru-minimal-implementation.patch mm-multi-gen-lru-exploit-locality-in-rmap.patch mm-multi-gen-lru-support-page-table-walks.patch mm-multi-gen-lru-support-page-table-walks-fix.patch mm-multi-gen-lru-optimize-multiple-memcgs.patch mm-multi-gen-lru-kill-switch.patch mm-multi-gen-lru-thrashing-prevention.patch mm-multi-gen-lru-debugfs-interface.patch mm-multi-gen-lru-admin-guide.patch mm-multi-gen-lru-design-doc.patch mm-vmscan-use-vma-iterator-instead-of-vm_next-fix.patch