All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: mm-commits@vger.kernel.org,Yibo.Cai@arm.com,slp@redhat.com,lina@asahilina.net,kirill.shutemov@linux.intel.com,justin.he@arm.com,catalin.marinas@arm.com,akpm@linux-foundation.org,akpm@linux-foundation.org
Subject: [folded-merged] mm-fix-__wp_page_copy_user-fallback-path-for-remote-mm-fix.patch removed from -mm tree
Date: Thu, 07 Nov 2024 12:48:15 -0800	[thread overview]
Message-ID: <20241107204816.78905C4CECC@smtp.kernel.org> (raw)


The quilt patch titled
     Subject: mm-fix-__wp_page_copy_user-fallback-path-for-remote-mm-fix
has been removed from the -mm tree.  Its filename was
     mm-fix-__wp_page_copy_user-fallback-path-for-remote-mm-fix.patch

This patch was dropped because it was folded into mm-fix-__wp_page_copy_user-fallback-path-for-remote-mm.patch

------------------------------------------------------
From: Andrew Morton <akpm@linux-foundation.org>
Subject: mm-fix-__wp_page_copy_user-fallback-path-for-remote-mm-fix
Date: Fri Nov  1 12:03:22 PM PDT 2024

coding style tweaks

Cc: Asahi Lina <lina@asahilina.net>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Jia He <justin.he@arm.com>
Cc: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Cc: Sergio Lopez Pascual <slp@redhat.com>
Cc: Yibo Cai <Yibo.Cai@arm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 mm/memory.c |   22 ++++++++++++----------
 1 file changed, 12 insertions(+), 10 deletions(-)

--- a/mm/memory.c~mm-fix-__wp_page_copy_user-fallback-path-for-remote-mm-fix
+++ a/mm/memory.c
@@ -3081,18 +3081,20 @@ static inline int __wp_page_copy_user(st
 			update_mmu_cache_range(vmf, vma, addr, vmf->pte, 1);
 	}
 
-	/* If the mm is a remote mm, copy in the page using access_remote_vm() */
-	if (current->mm != mm) {
-		if (access_remote_vm(mm, (unsigned long)uaddr, kaddr, PAGE_SIZE, 0) != PAGE_SIZE)
-			goto warn;
-	}
 	/*
-	 * This really shouldn't fail, because the page is there
-	 * in the page tables. But it might just be unreadable,
-	 * in which case we just give up and fill the result with
-	 * zeroes.
+	 * If the mm is a remote mm, copy in the page using access_remote_vm()
 	 */
-	else if (__copy_from_user_inatomic(kaddr, uaddr, PAGE_SIZE)) {
+	if (current->mm != mm) {
+		if (access_remote_vm(mm, (unsigned long)uaddr, kaddr,
+				     PAGE_SIZE, 0) != PAGE_SIZE)
+			goto warn;
+	} else if (__copy_from_user_inatomic(kaddr, uaddr, PAGE_SIZE)) {
+		/*
+		 * This really shouldn't fail, because the page is there
+		 * in the page tables. But it might just be unreadable,
+		 * in which case we just give up and fill the result with
+		 * zeroes.
+		 */
 		if (vmf->pte)
 			goto warn;
 
_

Patches currently in -mm which might be from akpm@linux-foundation.org are

mm-page_alloc-keep-track-of-free-highatomic-fix.patch
mm-fix-__wp_page_copy_user-fallback-path-for-remote-mm.patch
bootmem-stop-using-page-index-fix.patch
vma-detect-infinite-loop-in-vma-tree-fix.patch
maple_tree-add-a-test-checking-storing-null-fix.patch


                 reply	other threads:[~2024-11-07 20:48 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20241107204816.78905C4CECC@smtp.kernel.org \
    --to=akpm@linux-foundation.org \
    --cc=Yibo.Cai@arm.com \
    --cc=catalin.marinas@arm.com \
    --cc=justin.he@arm.com \
    --cc=kirill.shutemov@linux.intel.com \
    --cc=lina@asahilina.net \
    --cc=mm-commits@vger.kernel.org \
    --cc=slp@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.