Commit 3cd01bb5 authored by Alex Williamson's avatar Alex Williamson Committed by William McVicker
Browse files

UPSTREAM: mm: Fix is_zero_page() usage in try_grab_page()

The backport of upstream commit c8070b78 ("mm: Don't pin ZERO_PAGE
in pin_user_pages()") into v6.1.130 noted below in Fixes does not
account for commit 0f089235 ("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.

Bug: 411256892
Fixes: 476c1dfe ("mm: Don't pin ZERO_PAGE in pin_user_pages()")
Link: https://lore.kernel.org/all/Z_6uhLQjJ7SSzI13@eldamar.lan


Reported-by: default avatarSalvatore Bonaccorso <carnil@debian.org>
Reported-by: default avatarMilan Broz <gmazyland@gmail.com>
Reviewed-by: default avatarDavid Hildenbrand <david@redhat.com>
Cc: stable@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Cc: linux-mm@kvack.org
Cc: Sasha Levin <sashal@kernel.org>
Change-Id: I1a124e70161e48c9b3374aa3fc541c6a13ea1ff0
Signed-off-by: default avatarAlex Williamson <alex.williamson@redhat.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit edde34b7)
Signed-off-by: default avatarWill McVicker <willmcvicker@google.com>
parent 53b26534
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment