Skip to content

Commit

Permalink
mm/page_isolation: Fix an infinite loop in isolate_single_pageblock()
Browse files Browse the repository at this point in the history
HugeTLB allocation (32MB pages on 4K base page) via sysfs on arm64 platform
is getting stuck in isolate_single_pageblock(), because of an infinite loop
Because head_pfn always evaluate the same, so does pfn, and the outer loop
never exits. Dropping the relevant code block, which seems redundant, makes
the problem go away.

Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Zi Yan <ziy@nvidia.com>
Cc: linux-mm@kvack.org
Cc: linux-kernel@vger.kernel.org
Fixes: b2c9e2f ("mm: make alloc_contig_range work at pageblock granularity")
Signed-off-by: Anshuman Khandual <anshuman.khandual@arm.com>
  • Loading branch information
Anshuman Khandual authored and intel-lab-lkp committed May 30, 2022
1 parent dee9927 commit 13632ae
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions mm/page_isolation.c
Original file line number Diff line number Diff line change
Expand Up @@ -389,10 +389,6 @@ static int isolate_single_pageblock(unsigned long boundary_pfn, int flags,
struct page *head = compound_head(page);
unsigned long head_pfn = page_to_pfn(head);

if (head_pfn + nr_pages <= boundary_pfn) {
pfn = head_pfn + nr_pages;
continue;
}
#if defined CONFIG_COMPACTION || defined CONFIG_CMA
/*
* hugetlb, lru compound (THP), and movable compound pages
Expand Down

0 comments on commit 13632ae

Please sign in to comment.