All of lore.kernel.org
 help / color / mirror / Atom feed
From: <gregkh@linuxfoundation.org>
To: alex.williamson@redhat.com,carnil@debian.org,gmazyland@gmail.com,gregkh@linuxfoundation.org,linux-mm@kvack.org,sashal@kernel.org
Cc: <stable-commits@vger.kernel.org>
Subject: Patch "mm: Fix is_zero_page() usage in try_grab_page()" has been added to the 6.1-stable tree
Date: Tue, 22 Apr 2025 10:05:38 +0200	[thread overview]
Message-ID: <2025042238-applaud-postnasal-ee55@gregkh> (raw)
In-Reply-To: <20250416202441.3911142-1-alex.williamson@redhat.com>


This is a note to let you know that I've just added the patch titled

    mm: Fix is_zero_page() usage in try_grab_page()

to the 6.1-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     mm-fix-is_zero_page-usage-in-try_grab_page.patch
and it can be found in the queue-6.1 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@vger.kernel.org> know about it.


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*


Patches currently in stable-queue which might be from alex.williamson@redhat.com are

queue-6.1/mm-fix-is_zero_page-usage-in-try_grab_page.patch
queue-6.1/revert-pci-avoid-reset-when-disabled-via-sysfs.patch


  parent reply	other threads:[~2025-04-22  8:05 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-16 20:24 [PATCH stable 6.1] mm: Fix is_zero_page() usage in try_grab_page() Alex Williamson
2025-04-16 21:49 ` Salvatore Bonaccorso
2025-04-22  8:01   ` Greg KH
2025-04-17  7:12 ` David Hildenbrand
2025-04-18 15:57 ` Sasha Levin
2025-04-22  8:05 ` gregkh [this message]
2025-04-22  8:47   ` Patch "mm: Fix is_zero_page() usage in try_grab_page()" has been added to the 6.1-stable tree David Hildenbrand
2025-04-22  9:02     ` Greg KH

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=2025042238-applaud-postnasal-ee55@gregkh \
    --to=gregkh@linuxfoundation.org \
    --cc=alex.williamson@redhat.com \
    --cc=carnil@debian.org \
    --cc=gmazyland@gmail.com \
    --cc=linux-mm@kvack.org \
    --cc=sashal@kernel.org \
    --cc=stable-commits@vger.kernel.org \
    /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.