]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
6.1-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 22 Apr 2025 08:05:38 +0000 (10:05 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 22 Apr 2025 08:05:38 +0000 (10:05 +0200)
added patches:
mm-fix-is_zero_page-usage-in-try_grab_page.patch

queue-6.1/mm-fix-is_zero_page-usage-in-try_grab_page.patch [new file with mode: 0644]
queue-6.1/series

diff --git a/queue-6.1/mm-fix-is_zero_page-usage-in-try_grab_page.patch b/queue-6.1/mm-fix-is_zero_page-usage-in-try_grab_page.patch
new file mode 100644 (file)
index 0000000..004d56c
--- /dev/null
@@ -0,0 +1,41 @@
+From alex.williamson@redhat.com  Tue Apr 22 10:00:53 2025
+From: Alex Williamson <alex.williamson@redhat.com>
+Date: Wed, 16 Apr 2025 14:24:39 -0600
+Subject: mm: Fix is_zero_page() usage in try_grab_page()
+Cc: Alex Williamson <alex.williamson@redhat.com>, Salvatore Bonaccorso <carnil@debian.org>, Milan Broz <gmazyland@gmail.com>, stable@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, Sasha Levin <sashal@kernel.org>
+Message-ID: <20250416202441.3911142-1-alex.williamson@redhat.com>
+
+From: Alex Williamson <alex.williamson@redhat.com>
+
+The backport of upstream commit c8070b787519 ("mm: Don't pin ZERO_PAGE
+in pin_user_pages()") into v6.1.130 noted below in Fixes does not
+account for commit 0f0892356fa1 ("mm: allow multiple error returns in
+try_grab_page()"), which changed the return value of try_grab_page()
+from bool to int.  Therefore returning 0, success in the upstream
+version, becomes an error here.  Fix the return value.
+
+Fixes: 476c1dfefab8 ("mm: Don't pin ZERO_PAGE in pin_user_pages()")
+Link: https://lore.kernel.org/all/Z_6uhLQjJ7SSzI13@eldamar.lan
+Reported-by: Salvatore Bonaccorso <carnil@debian.org>
+Reported-by: Milan Broz <gmazyland@gmail.com>
+Cc: stable@vger.kernel.org
+Cc: linux-kernel@vger.kernel.org
+Cc: linux-mm@kvack.org
+Cc: Sasha Levin <sashal@kernel.org>
+Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ mm/gup.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/mm/gup.c
++++ b/mm/gup.c
+@@ -232,7 +232,7 @@ bool __must_check try_grab_page(struct p
+                * and it is used in a *lot* of places.
+                */
+               if (is_zero_page(page))
+-                      return 0;
++                      return true;
+               /*
+                * Similar to try_grab_folio(): be sure to *also*
index f84a2252b3e2d0826ccb6f2304a619499b2a14ad..de36758a86f9f9f81a37d013eef487e5f5669d4f 100644 (file)
@@ -263,3 +263,4 @@ mptcp-sockopt-fix-getting-freebind-transparent.patch
 misc-pci_endpoint_test-avoid-issue-of-interrupts-remaining-after-request_irq-error.patch
 misc-pci_endpoint_test-fix-displaying-irq_type-after-request_irq-error.patch
 misc-pci_endpoint_test-fix-irq_type-to-convey-the-correct-type.patch
+mm-fix-is_zero_page-usage-in-try_grab_page.patch