[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250423142635.211780540@linuxfoundation.org>
Date: Wed, 23 Apr 2025 16:44:13 +0200
From: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To: stable@...r.kernel.org
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
patches@...ts.linux.dev,
Salvatore Bonaccorso <carnil@...ian.org>,
Milan Broz <gmazyland@...il.com>,
David Hildenbrand <david@...hat.com>,
linux-kernel@...r.kernel.org,
linux-mm@...ck.org,
Sasha Levin <sashal@...nel.org>,
Alex Williamson <alex.williamson@...hat.com>
Subject: [PATCH 6.1 264/291] mm: Fix is_zero_page() usage in try_grab_page()
6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Alex Williamson <alex.williamson@...hat.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@...ian.org>
Reported-by: Milan Broz <gmazyland@...il.com>
Reviewed-by: David Hildenbrand <david@...hat.com>
Cc: stable@...r.kernel.org
Cc: linux-kernel@...r.kernel.org
Cc: linux-mm@...ck.org
Cc: Sasha Levin <sashal@...nel.org>
Signed-off-by: Alex Williamson <alex.williamson@...hat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@...uxfoundation.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*
Powered by blists - more mailing lists