mm/swapops: make is_pmd_migration_entry more strict
mainline inclusion from mainline-v5.19-rc1 commit b304c6f0 category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/I5OHOB CVE: NA -------------------------------- 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. Change-Id: I5e4a32f740adca7a8a2c719b6fc5b0d072e0d3e2 Link: https://lkml.kernel.org/r/1651131333-6386-1-git-send-email-zhanghongchen@loongson.cnSigned-off-by: NHongchen Zhang <zhanghongchen@loongson.cn> Acked-by: NPeter Xu <peterx@redhat.com> Cc: Alistair Popple <apopple@nvidia.com> Cc: Ralph Campbell <rcampbell@nvidia.com> Cc: Naoya Horiguchi <naoya.horiguchi@nec.com> Cc: Hugh Dickins <hughd@google.com> Signed-off-by: NAndrew Morton <akpm@linux-foundation.org> Signed-off-by: NHuacai Chen <chenhuacai@loongson.cn>
Showing
想要评论请 注册 或 登录