Skip to content

Commit a85468b

Browse files
Chen Wanduntorvalds
Chen Wandun
authored andcommitted
Revert "mm/page_isolation: unset migratetype directly for non Buddy page"
This reverts commit 721fb89. Commit 721fb89 ("mm/page_isolation: unset migratetype directly for non Buddy page") will result memory that should in buddy disappear by mistake. move_freepages_block moves all pages in pageblock instead of pages indicated by input parameter, so if input pages is not in buddy but other pages in pageblock is in buddy, it will result in page out of control. Link: https://lkml.kernel.org/r/[email protected] Fixes: 721fb89 ("mm/page_isolation: unset migratetype directly for non Buddy page") Signed-off-by: Chen Wandun <[email protected]> Reported-by: "kernelci.org bot" <[email protected]> Acked-by: David Hildenbrand <[email protected]> Tested-by: Dong Aisheng <[email protected]> Tested-by: Francesco Dolcini <[email protected]> Acked-by: Vlastimil Babka <[email protected]> Tested-by: Guenter Roeck <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
1 parent 1f2cfdd commit a85468b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

mm/page_isolation.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ static void unset_migratetype_isolate(struct page *page, unsigned migratetype)
115115
* onlining - just onlined memory won't immediately be considered for
116116
* allocation.
117117
*/
118-
if (!isolated_page && PageBuddy(page)) {
118+
if (!isolated_page) {
119119
nr_pages = move_freepages_block(zone, page, migratetype, NULL);
120120
__mod_zone_freepage_state(zone, nr_pages, migratetype);
121121
}

0 commit comments

Comments
 (0)