From: Greg KH <gregkh@linuxfoundation.org>
To: Sidhartha Kumar <sidhartha.kumar@oracle.com>
Cc: stable@vger.kernel.org, linux-kernel@vger.kernel.org,
songmuchun@bytedance.com, mike.kravetz@oracle.com,
Ackerley Tng <ackerleytng@google.com>
Subject: Re: [PATCH 6.3.y] mm/hugetlb: revert use of page_cache_next_miss()
Date: Mon, 3 Jul 2023 20:31:06 +0200 [thread overview]
Message-ID: <2023070356-paddling-grip-b31a@gregkh> (raw)
In-Reply-To: <20230629211817.194786-1-sidhartha.kumar@oracle.com>
On Thu, Jun 29, 2023 at 05:18:17PM -0400, Sidhartha Kumar wrote:
> commit fd4aed8d985a3236d0877ff6d0c80ad39d4ce81a upstream
>
> Ackerley Tng reported an issue with hugetlbfs fallocate as noted in the
> Closes tag. The issue showed up after the conversion of hugetlb page
> cache lookup code to use page_cache_next_miss. User visible effects are:
>
> - hugetlbfs fallocate incorrectly returns -EEXIST if pages are presnet
> in the file.
> - hugetlb pages will not be included in core dumps if they need to be
> brought in via GUP.
> - userfaultfd UFFDIO_COPY will not notice pages already present in the
> cache. It may try to allocate a new page and potentially return
> ENOMEM as opposed to EEXIST.
>
> Revert the use page_cache_next_miss() in hugetlb code.
>
> The upstream fix[2] cannot be used used directly as the return value for
> filemap_get_folio() has been changed between 6.3 and upstream.
>
> Closes: https://lore.kernel.org/linux-mm/cover.1683069252.git.ackerleytng@google.com
> Fixes: d0ce0e47b323 ("mm/hugetlb: convert hugetlb fault paths to use alloc_hugetlb_folio()")
> Cc: <stable@vger.kernel.org> #v6.3
> Reported-by: Ackerley Tng <ackerleytng@google.com>
> Signed-off-by: Sidhartha Kumar <sidhartha.kumar@oracle.com>
>
> [1] https://lore.kernel.org/linux-mm/cover.1683069252.git.ackerleytng@google.com/
> [2] https://lore.kernel.org/lkml/20230621230255.GD4155@monkey/
> ---
>
> fs/hugetlbfs/inode.c | 8 +++-----
> mm/hugetlb.c | 11 +++++------
> 2 files changed, 8 insertions(+), 11 deletions(-)
Now queued up, thanks.
greg k-h
next prev parent reply other threads:[~2023-07-03 18:31 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-29 21:18 [PATCH 6.3.y] mm/hugetlb: revert use of page_cache_next_miss() Sidhartha Kumar
2023-07-03 18:31 ` Greg KH [this message]
-- strict thread matches above, loose matches on Subject: below --
2023-06-06 17:20 Sidhartha Kumar
2023-06-06 17:38 ` Greg KH
2023-06-06 18:13 ` Sidhartha Kumar
2023-06-07 18:33 ` Greg KH
2023-06-07 20:35 ` Sidhartha Kumar
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=2023070356-paddling-grip-b31a@gregkh \
--to=gregkh@linuxfoundation.org \
--cc=ackerleytng@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mike.kravetz@oracle.com \
--cc=sidhartha.kumar@oracle.com \
--cc=songmuchun@bytedance.com \
--cc=stable@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox