The patch titled Subject: mm-handling-non-lru-pages-returned-by-vm_normal_pages-fix has been added to the -mm mm-unstable branch. Its filename is mm-handling-non-lru-pages-returned-by-vm_normal_pages-fix.patch This patch will shortly appear at https://git.kernel.org/pub/scm/linux/kernel/git/akpm/25-new.git/tree/patches/mm-handling-non-lru-pages-returned-by-vm_normal_pages-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: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> Subject: mm-handling-non-lru-pages-returned-by-vm_normal_pages-fix Date: Tue May 31 10:27:42 AM PDT 2022 adjust comment positioning, fix typo Cc: Alex Sierra <alex.sierra@xxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- mm/memory.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) --- a/mm/memory.c~mm-handling-non-lru-pages-returned-by-vm_normal_pages-fix +++ a/mm/memory.c @@ -623,14 +623,15 @@ struct page *vm_normal_page(struct vm_ar return NULL; if (is_zero_pfn(pfn)) return NULL; + /* + * NOTE: New users of ZONE_DEVICE will not set pte_devmap() and + * will have refcounts incremented on their struct pages when + * they are inserted into PTEs, thus they are safe to return + * here. Legacy ZONE_DEVICE pages that set pte_devmap() do not + * have refcounts. Example of legacy ZONE_DEVICE is + * MEMORY_DEVICE_FS_DAX type in pmem or virtio_fs drivers. + */ if (pte_devmap(pte)) -/* - * NOTE: New uers of ZONE_DEVICE will not set pte_devmap() and will have - * refcounts incremented on their struct pages when they are inserted into - * PTEs, thus they are safe to return here. Legacy ZONE_DEVICE pages that set - * pte_devmap() do not have refcounts. Example of legacy ZONE_DEVICE is - * MEMORY_DEVICE_FS_DAX type in pmem or virtio_fs drivers. - */ return NULL; print_bad_pte(vma, addr, pte, NULL); _ Patches currently in -mm which might be from akpm@xxxxxxxxxxxxxxxxxxxx are mm-page_alloc-remotely-drain-per-cpu-lists-checkpatch-fixes.patch mm-handling-non-lru-pages-returned-by-vm_normal_pages-fix.patch linux-next-rejects.patch linux-next-git-rejects.patch mm-oom_killc-fix-vm_oom_kill_table-ifdeffery.patch