All of lore.kernel.org
 help / color / mirror / Atom feed
diff for duplicates of <20180718071230.GA4302@rapoport-lnx>

diff --git a/a/1.txt b/N1/1.txt
index ba7c4ef..6c68f7e 100644
--- a/a/1.txt
+++ b/N1/1.txt
@@ -13,49 +13,3 @@ The fix is below.
 --
 Sincerely yours,
 Mike.
-
->From 3711b6a72abe3796b2b97fdba8eadd995b29f195 Mon Sep 17 00:00:00 2001
-From: Mike Rapoport <rppt@linux.vnet.ibm.com>
-Date: Wed, 18 Jul 2018 09:45:54 +0300
-Subject: [PATCH] userfaultfd: remove uffd flags from vma->vm_flags if
- UFFD_EVENT_FORK fails
-
-The fix in commit 0cbb4b4f4c44 ("userfaultfd: clear the
-vma->vm_userfaultfd_ctx if UFFD_EVENT_FORK fails") cleared the
-vma->vm_userfaultfd_ctx but kept userfaultfd flags in vma->vm_flags that
-were copied from the parent process VMA.
-
-As the result, there is an inconsistency between the values of
-vma->vm_userfaultfd_ctx.ctx and vma->vm_flags which triggers BUG_ON in
-userfaultfd_release().
-
-Clearing the uffd flags from vma->vm_flags in case of UFFD_EVENT_FORK
-failure resolves the issue.
-
-Signed-off-by: Mike Rapoport <rppt@linux.vnet.ibm.com>
-Reported-by: syzbot+121be635a7a35ddb7dcb@syzkaller.appspotmail.com
-Cc: Andrea Arcangeli <aarcange@redhat.com>
-Cc: Eric Biggers <ebiggers3@gmail.com>
-Cc: stable@vger.kernel.org
----
- fs/userfaultfd.c | 4 +++-
- 1 file changed, 3 insertions(+), 1 deletion(-)
-
-diff --git a/fs/userfaultfd.c b/fs/userfaultfd.c
-index 594d192b2331..bad9cea37f12 100644
---- a/fs/userfaultfd.c
-+++ b/fs/userfaultfd.c
-@@ -633,8 +633,10 @@ static void userfaultfd_event_wait_completion(struct userfaultfd_ctx *ctx,
- 		/* the various vma->vm_userfaultfd_ctx still points to it */
- 		down_write(&mm->mmap_sem);
- 		for (vma = mm->mmap; vma; vma = vma->vm_next)
--			if (vma->vm_userfaultfd_ctx.ctx == release_new_ctx)
-+			if (vma->vm_userfaultfd_ctx.ctx == release_new_ctx) {
- 				vma->vm_userfaultfd_ctx = NULL_VM_UFFD_CTX;
-+				vma->vm_flags &= ~(VM_UFFD_WP | VM_UFFD_MISSING);
-+			}
- 		up_write(&mm->mmap_sem);
- 
- 		userfaultfd_ctx_put(release_new_ctx);
--- 
-2.7.4
diff --git a/a/content_digest b/N1/content_digest
index 704d342..1a4f5d5 100644
--- a/a/content_digest
+++ b/N1/content_digest
@@ -27,52 +27,6 @@
  "\n"
  "--\n"
  "Sincerely yours,\n"
- "Mike.\n"
- "\n"
- ">From 3711b6a72abe3796b2b97fdba8eadd995b29f195 Mon Sep 17 00:00:00 2001\n"
- "From: Mike Rapoport <rppt@linux.vnet.ibm.com>\n"
- "Date: Wed, 18 Jul 2018 09:45:54 +0300\n"
- "Subject: [PATCH] userfaultfd: remove uffd flags from vma->vm_flags if\n"
- " UFFD_EVENT_FORK fails\n"
- "\n"
- "The fix in commit 0cbb4b4f4c44 (\"userfaultfd: clear the\n"
- "vma->vm_userfaultfd_ctx if UFFD_EVENT_FORK fails\") cleared the\n"
- "vma->vm_userfaultfd_ctx but kept userfaultfd flags in vma->vm_flags that\n"
- "were copied from the parent process VMA.\n"
- "\n"
- "As the result, there is an inconsistency between the values of\n"
- "vma->vm_userfaultfd_ctx.ctx and vma->vm_flags which triggers BUG_ON in\n"
- "userfaultfd_release().\n"
- "\n"
- "Clearing the uffd flags from vma->vm_flags in case of UFFD_EVENT_FORK\n"
- "failure resolves the issue.\n"
- "\n"
- "Signed-off-by: Mike Rapoport <rppt@linux.vnet.ibm.com>\n"
- "Reported-by: syzbot+121be635a7a35ddb7dcb@syzkaller.appspotmail.com\n"
- "Cc: Andrea Arcangeli <aarcange@redhat.com>\n"
- "Cc: Eric Biggers <ebiggers3@gmail.com>\n"
- "Cc: stable@vger.kernel.org\n"
- "---\n"
- " fs/userfaultfd.c | 4 +++-\n"
- " 1 file changed, 3 insertions(+), 1 deletion(-)\n"
- "\n"
- "diff --git a/fs/userfaultfd.c b/fs/userfaultfd.c\n"
- "index 594d192b2331..bad9cea37f12 100644\n"
- "--- a/fs/userfaultfd.c\n"
- "+++ b/fs/userfaultfd.c\n"
- "@@ -633,8 +633,10 @@ static void userfaultfd_event_wait_completion(struct userfaultfd_ctx *ctx,\n"
- " \t\t/* the various vma->vm_userfaultfd_ctx still points to it */\n"
- " \t\tdown_write(&mm->mmap_sem);\n"
- " \t\tfor (vma = mm->mmap; vma; vma = vma->vm_next)\n"
- "-\t\t\tif (vma->vm_userfaultfd_ctx.ctx == release_new_ctx)\n"
- "+\t\t\tif (vma->vm_userfaultfd_ctx.ctx == release_new_ctx) {\n"
- " \t\t\t\tvma->vm_userfaultfd_ctx = NULL_VM_UFFD_CTX;\n"
- "+\t\t\t\tvma->vm_flags &= ~(VM_UFFD_WP | VM_UFFD_MISSING);\n"
- "+\t\t\t}\n"
- " \t\tup_write(&mm->mmap_sem);\n"
- " \n"
- " \t\tuserfaultfd_ctx_put(release_new_ctx);\n"
- "-- \n"
- 2.7.4
+ Mike.
 
-a530818adaaa1e153fa54c51f043f5e549d836edf3e12546ac709f4ef3807395
+09d322cdbc8e034e918ba6e597dfc3701ea64fd641adc52c4f72a82667fa28c5

diff --git a/a/1.txt b/N2/1.txt
index ba7c4ef..ae04d1e 100644
--- a/a/1.txt
+++ b/N2/1.txt
@@ -14,7 +14,7 @@ The fix is below.
 Sincerely yours,
 Mike.
 
->From 3711b6a72abe3796b2b97fdba8eadd995b29f195 Mon Sep 17 00:00:00 2001
+From 3711b6a72abe3796b2b97fdba8eadd995b29f195 Mon Sep 17 00:00:00 2001
 From: Mike Rapoport <rppt@linux.vnet.ibm.com>
 Date: Wed, 18 Jul 2018 09:45:54 +0300
 Subject: [PATCH] userfaultfd: remove uffd flags from vma->vm_flags if
diff --git a/a/content_digest b/N2/content_digest
index 704d342..ffb740a 100644
--- a/a/content_digest
+++ b/N2/content_digest
@@ -29,7 +29,7 @@
  "Sincerely yours,\n"
  "Mike.\n"
  "\n"
- ">From 3711b6a72abe3796b2b97fdba8eadd995b29f195 Mon Sep 17 00:00:00 2001\n"
+ "From 3711b6a72abe3796b2b97fdba8eadd995b29f195 Mon Sep 17 00:00:00 2001\n"
  "From: Mike Rapoport <rppt@linux.vnet.ibm.com>\n"
  "Date: Wed, 18 Jul 2018 09:45:54 +0300\n"
  "Subject: [PATCH] userfaultfd: remove uffd flags from vma->vm_flags if\n"
@@ -75,4 +75,4 @@
  "-- \n"
  2.7.4
 
-a530818adaaa1e153fa54c51f043f5e549d836edf3e12546ac709f4ef3807395
+e79063fb443c85d38a8f745e6f8b86605e320b72fa031e09011a131af2ceb902

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.