Skip to contentSkip to conversation

mm-page_alloc-always-remove-pages-from-temporary-list.patch removed from -mm tree

merged mm-stable Andrew Morton 1 participant 1 message Dec 1, 2022

lore
Share & tools
lore

Andrew Morton

author tree notice Applied
#0 lore raw

The quilt patch titled
Subject: mm/page_alloc: always remove pages from temporary list
has been removed from the -mm tree. Its filename was
mm-page_alloc-always-remove-pages-from-temporary-list.patch

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

------------------------------------------------------
From: Mel Gorman <[email protected]>
Subject: mm/page_alloc: always remove pages from temporary list
Date: Fri, 18 Nov 2022 10:17:13 +0000

Patch series "Leave IRQs enabled for per-cpu page allocations", v3.

This patch (of 2):

free_unref_page_list() has neglected to remove pages properly from the list of pages to free since forever. It works by coincidence because list_add happened to do the right thing adding the pages to just the PCP lists. However, a later patch added pages to either the PCP list or the zone list but only properly deleted the page from the list in one path leading to list corruption and a subsequent failure. As a preparation patch, always delete the pages from one list properly before adding to another. On its own, this fixes nothing although it adds a fractional amount of overhead but is critical to the next patch.

---

 mm/page_alloc.c |    2 ++
 1 file changed, 2 insertions(+)
mm/page_alloc.c renamed from mm/page_alloc.c~mm-page_alloc-always-remove-pages-from-temporary-list +2 -0
@@ -3553,6 +3553,8 @@ void free_unref_page_list(struct list_he
 	list_for_each_entry_safe(page, next, list, lru) {
 		struct zone *zone = page_zone(page);
 
+		list_del(&page->lru);
+
 		/* Different zone, different pcp lock. */
 		if (zone != locked_zone) {
 			if (pcp)

_

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