From: Andrew Bresticker <abrestic@rivosinc.com>
To: Andrew Morton <akpm@linux-foundation.org>,
David Hildenbrand <david@redhat.com>
Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org,
Andrew Bresticker <abrestic@rivosinc.com>
Subject: [PATCH] mm/memory: Pass head page to do_set_pmd()
Date: Tue, 11 Jun 2024 07:18:49 -0700 [thread overview]
Message-ID: <20240611141849.2788693-1-abrestic@rivosinc.com> (raw)
The requirement that the head page be passed to do_set_pmd() was added
in commit ef37b2ea08ac ("mm/memory: page_add_file_rmap() ->
folio_add_file_rmap_[pte|pmd]()") and prevents pmd-mapping in the
finish_fault() path if vmf->page is anything but the head page for an
otherwise suitable vma and pmd-sized page. Have finish_fault() pass in
the head page instead.
Fixes: ef37b2ea08ac ("mm/memory: page_add_file_rmap() -> folio_add_file_rmap_[pte|pmd]()")
Signed-off-by: Andrew Bresticker <abrestic@rivosinc.com>
---
mm/memory.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/mm/memory.c b/mm/memory.c
index 0f47a533014e..f13b953b507c 100644
--- a/mm/memory.c
+++ b/mm/memory.c
@@ -4764,7 +4764,7 @@ vm_fault_t finish_fault(struct vm_fault *vmf)
if (pmd_none(*vmf->pmd)) {
if (PageTransCompound(page)) {
- ret = do_set_pmd(vmf, page);
+ ret = do_set_pmd(vmf, compound_head(page));
if (ret != VM_FAULT_FALLBACK)
return ret;
}
--
2.34.1
next reply other threads:[~2024-06-11 14:18 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-11 14:18 Andrew Bresticker [this message]
2024-06-11 14:46 ` David Hildenbrand
2024-06-11 14:48 ` David Hildenbrand
2024-06-11 15:24 ` Andrew Bresticker
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=20240611141849.2788693-1-abrestic@rivosinc.com \
--to=abrestic@rivosinc.com \
--cc=akpm@linux-foundation.org \
--cc=david@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.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