Skip to content

Commit

Permalink
x86: stricter check in follow_huge_addr()
Browse files Browse the repository at this point in the history
The first page of the compound page is determined in follow_huge_addr()
but then PageCompound() only checks if the page is part of a compound page.
PageHead() allows checking if this is indeed the first page of the
compound.

Cc: Jeremy Fitzhardinge <jeremy@goop.org>
Signed-off-by: Christoph Lameter <clameter@sgi.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
  • Loading branch information
Christoph Lameter authored and Ingo Molnar committed Mar 27, 2008
1 parent b2ef749 commit 25e5988
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/x86/mm/hugetlbpage.c
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ follow_huge_addr(struct mm_struct *mm, unsigned long address, int write)

page = &pte_page(*pte)[vpfn % (HPAGE_SIZE/PAGE_SIZE)];

WARN_ON(!PageCompound(page));
WARN_ON(!PageHead(page));

return page;
}
Expand Down

0 comments on commit 25e5988

Please sign in to comment.