Skip to contentSkip to conversation

Bugfix for PPC64 hugepage support

PATCH David Gibson 1 participant 1 message Apr 1, 2004

lore
Share & tools
lore
#0 lore raw

Linus, please apply.

Due to a misunderstanding of pmd_offset() the PPC64 hugepage code could end up looking at bogus pages as if they were PMD pages.

arch/ppc64/mm/hugetlbpage.c +3 -0
Index: working-2.6/arch/ppc64/mm/hugetlbpage.c
===================================================================
@@ -190,6 +190,9 @@
 	BUG_ON(!in_hugepage_area(mm->context, addr));
 
 	pgd = pgd_offset(mm, addr);
+	if (pgd_none(*pgd))
+		return NULL;
+
 	pmd = pmd_offset(pgd, addr);
 
 	/* We shouldn't find a (normal) PTE page pointer here */
Signature · 4 lines
David Gibson			| For every complex problem there is a
david AT gibson.dropbear.id.au	| solution which is simple, neat and
				| wrong.
http://www.ozlabs.org/people/dgibson