Message ID | 20220413211153.6AFC4C385A3@smtp.kernel.org |
---|---|
State | New |
Headers | show |
Series | [nacked] mm-page_alloc-check-pfn-is-valid-before-moving-to-freelist.patch removed from -mm tree | expand |
--- a/mm/page_alloc.c~mm-page_alloc-check-pfn-is-valid-before-moving-to-freelist +++ a/mm/page_alloc.c @@ -2521,6 +2521,15 @@ static int move_freepages(struct zone *z int pages_moved = 0; for (pfn = start_pfn; pfn <= end_pfn;) { + if (!pfn_valid(pfn)) { + /* + * Pageblock alignment may cause us to try to access + * into a hole + */ + pfn++; + continue; + } + page = pfn_to_page(pfn); if (!PageBuddy(page)) { /*