The patch titled Subject: mm/swapops: make is_pmd_migration_entry more strict has been added to the -mm tree. Its filename is mm-swapops-make-is_pmd_migration_entry-more-strict.patch This patch should soon appear at https://ozlabs.org/~akpm/mmots/broken-out/mm-swapops-make-is_pmd_migration_entry-more-strict.patch and later at https://ozlabs.org/~akpm/mmotm/broken-out/mm-swapops-make-is_pmd_migration_entry-more-strict.patch 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 and is updated there every 3-4 working days ------------------------------------------------------ From: Hongchen Zhang <zhanghongchen@xxxxxxxxxxx> Subject: mm/swapops: make is_pmd_migration_entry more strict A pmd migration entry should first be a swap pmd,so use is_swap_pmd(pmd) instead of !pmd_present(pmd). On the other hand, some architecture (MIPS for example) may misjudge a pmd_none entry as a pmd migration entry. Link: https://lkml.kernel.org/r/1651131333-6386-1-git-send-email-zhanghongchen@xxxxxxxxxxx Signed-off-by: Hongchen Zhang <zhanghongchen@xxxxxxxxxxx> Acked-by: Peter Xu <peterx@xxxxxxxxxx> Cc: Alistair Popple <apopple@xxxxxxxxxx> Cc: Ralph Campbell <rcampbell@xxxxxxxxxx> Cc: Naoya Horiguchi <naoya.horiguchi@xxxxxxx> Cc: Hugh Dickins <hughd@xxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- include/linux/swapops.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/include/linux/swapops.h~mm-swapops-make-is_pmd_migration_entry-more-strict +++ a/include/linux/swapops.h @@ -424,7 +424,7 @@ static inline pmd_t swp_entry_to_pmd(swp static inline int is_pmd_migration_entry(pmd_t pmd) { - return !pmd_present(pmd) && is_migration_entry(pmd_to_swp_entry(pmd)); + return is_swap_pmd(pmd) && is_migration_entry(pmd_to_swp_entry(pmd)); } #else static inline int set_pmd_migration_entry(struct page_vma_mapped_walk *pvmw, _ Patches currently in -mm which might be from zhanghongchen@xxxxxxxxxxx are mm-swapops-make-is_pmd_migration_entry-more-strict.patch