Skip to contentSkip to conversation

mm-page_isolation-use-compound_nr-correctly-in-isolate_single_pageblock.patch removed from -mm tree

merged mm-hotfixes-stable Andrew Morton 1 participant 1 message Jun 1, 2022

lore
Share & tools
lore

Andrew Morton

author tree notice Applied
#0 lore raw

The quilt patch titled
Subject: mm: page_isolation: use compound_nr() correctly in isolate_single_pageblock()
has been removed from the -mm tree. Its filename was
mm-page_isolation-use-compound_nr-correctly-in-isolate_single_pageblock.patch

This patch was dropped because it was merged into the mm-hotfixes-stable branch of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm

------------------------------------------------------
From: Zi Yan <[email protected]>
Subject: mm: page_isolation: use compound_nr() correctly in isolate_single_pageblock()
Date: Mon, 30 May 2022 22:44:50 -0400

When compound_nr(page) was used, page was not guaranteed to be the head of the compound page and it could cause an infinite loop. Fix it by calling it on the head page.

---

 mm/page_isolation.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
mm/page_isolation.c renamed from mm/page_isolation.c~mm-page_isolation-use-compound_nr-correctly-in-isolate_single_pageblock +1 -1
@@ -385,9 +385,9 @@ static int isolate_single_pageblock(unsi
 		 * above do the rest. If migration is not possible, just fail.
 		 */
 		if (PageCompound(page)) {
-			unsigned long nr_pages = compound_nr(page);
 			struct page *head = compound_head(page);
 			unsigned long head_pfn = page_to_pfn(head);
+			unsigned long nr_pages = compound_nr(head);
 
 			if (head_pfn + nr_pages <= boundary_pfn) {
 				pfn = head_pfn + nr_pages;

_

Patches currently in -mm which might be from [email protected] are