All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: mm-commits@vger.kernel.org, willy@infradead.org,
	hughd@google.com, akpm@linux-foundation.org
Subject: [alternative-merged] mm-migrate-fix-remove_migration_pte-of-hugetlb-entry.patch removed from -mm tree
Date: Tue, 01 Mar 2022 08:51:00 -0800	[thread overview]
Message-ID: <20220301165100.DBE9BC340EE@smtp.kernel.org> (raw)


The patch titled
     Subject: mm/migrate: fix remove_migration_pte() of hugetlb entry
has been removed from the -mm tree.  Its filename was
     mm-migrate-fix-remove_migration_pte-of-hugetlb-entry.patch

This patch was dropped because an alternative patch was merged

------------------------------------------------------
From: Hugh Dickins <hughd@google.com>
Subject: mm/migrate: fix remove_migration_pte() of hugetlb entry

The foliation of remove_migration_pte() is currently wrong on hugetlb anon
entries, causing LTP move_pages12 to crash on BUG_ON(!PageLocked) in
hugepage_add_anon_rmap().

Link: https://lkml.kernel.org/r/bd28ebcf-4d42-7184-8189-ffed6fe7d4dc@google.com
Fixes: b4010e88f071 ("mm/migrate: Convert remove_migration_ptes() to folios")
Signed-off-by: Hugh Dickins <hughd@google.com>
Cc: Matthew Wilcox <willy@infradead.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 mm/migrate.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

--- a/mm/migrate.c~mm-migrate-fix-remove_migration_pte-of-hugetlb-entry
+++ a/mm/migrate.c
@@ -183,7 +183,8 @@ static bool remove_migration_pte(struct
 		struct page *new;
 		unsigned long idx = 0;
 
-		if (!folio_test_ksm(folio))
+		/* Skip call in common case, plus .pgoff is invalid for KSM */
+		if (pvmw.nr_pages != 1 && !folio_test_hugetlb(folio))
 			idx = linear_page_index(vma, pvmw.address) - pvmw.pgoff;
 		new = folio_page(folio, idx);
 
_

Patches currently in -mm which might be from hughd@google.com are

memfd-fix-f_seal_write-after-shmem-huge-page-allocated.patch
tmpfs-support-for-file-creation-time-fix.patch


                 reply	other threads:[~2022-03-01 16:51 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20220301165100.DBE9BC340EE@smtp.kernel.org \
    --to=akpm@linux-foundation.org \
    --cc=hughd@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mm-commits@vger.kernel.org \
    --cc=willy@infradead.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.