Commit ccfcbaed authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] ppc64: bugfix for hugepage support

From: David Gibson <david@gibson.dropbear.id.au>

Due to a misunderstanding of pmd_offset() the PPC64 hugepage code could end
up looking at bogus pages as if they were PMD pages.
parent 007658d4
...@@ -190,6 +190,9 @@ static hugepte_t *hugepte_offset(struct mm_struct *mm, unsigned long addr) ...@@ -190,6 +190,9 @@ static hugepte_t *hugepte_offset(struct mm_struct *mm, unsigned long addr)
BUG_ON(!in_hugepage_area(mm->context, addr)); BUG_ON(!in_hugepage_area(mm->context, addr));
pgd = pgd_offset(mm, addr); pgd = pgd_offset(mm, addr);
if (pgd_none(*pgd))
return NULL;
pmd = pmd_offset(pgd, addr); pmd = pmd_offset(pgd, addr);
/* We shouldn't find a (normal) PTE page pointer here */ /* We shouldn't find a (normal) PTE page pointer here */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment