The patch titled Subject: mm-gup-remove-vmas-parameter-from-get_user_pages_remote-fix has been added to the -mm mm-nonmm-unstable branch. Its filename is mm-gup-remove-vmas-parameter-from-get_user_pages_remote-fix.patch This patch will shortly appear at https://git.kernel.org/pub/scm/linux/kernel/git/akpm/25-new.git/tree/patches/mm-gup-remove-vmas-parameter-from-get_user_pages_remote-fix.patch This patch will later appear in the mm-nonmm-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-gup-remove-vmas-parameter-from-get_user_pages_remote-fix Date: Tue May 16 02:56:04 PM PDT 2023 fix unused var warning Reported-by: Anders Roxell <anders.roxell@xxxxxxxxxx> Link: https://lkml.kernel.org/r/20230516094919.GA411@mutt Cc: Lorenzo Stoakes <lstoakes@xxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- mm/memory.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) --- a/mm/memory.c~mm-gup-remove-vmas-parameter-from-get_user_pages_remote-fix +++ a/mm/memory.c @@ -5605,11 +5605,11 @@ int __access_remote_vm(struct mm_struct gup_flags, &vma); if (IS_ERR_OR_NULL(page)) { - int ret = 0; - #ifndef CONFIG_HAVE_IOREMAP_PROT break; #else + int res = 0; + /* * Check if this is a VM_IO | VM_PFNMAP VMA, which * we can access using slightly different code. @@ -5617,11 +5617,11 @@ int __access_remote_vm(struct mm_struct if (!vma) break; if (vma->vm_ops && vma->vm_ops->access) - ret = vma->vm_ops->access(vma, addr, buf, + res = vma->vm_ops->access(vma, addr, buf, len, write); - if (ret <= 0) + if (res <= 0) break; - bytes = ret; + bytes = res; #endif } else { bytes = len; _ Patches currently in -mm which might be from akpm@xxxxxxxxxxxxxxxxxxxx are mm-compaction-optimize-compact_memory-to-comply-with-the-admin-guide-fix.patch maple_tree-add-mas_next_range-and-mas_find_range-interfaces-checkpatch-fixes.patch mm-gup-remove-unused-vmas-parameter-from-pin_user_pages_remote-fix.patch fork-optimize-memcg_charge_kernel_stack-a-bit-fix.patch mm-gup-remove-vmas-parameter-from-get_user_pages_remote-fix.patch