From: Christoph Lameter Date: Thu, 27 Mar 2008 04:03:04 +0000 (-0700) Subject: x86: stricter check in follow_huge_addr() X-Git-Tag: v2.6.25-rc8~73^2~3 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=25e59881f109dc6378ebc463ae4c2de907435de3;p=linux-2.6-omap-h63xx.git x86: stricter check in follow_huge_addr() 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 Signed-off-by: Christoph Lameter Signed-off-by: Ingo Molnar --- diff --git a/arch/x86/mm/hugetlbpage.c b/arch/x86/mm/hugetlbpage.c index 4fbafb4bc2f..0b3d567e686 100644 --- a/arch/x86/mm/hugetlbpage.c +++ b/arch/x86/mm/hugetlbpage.c @@ -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; }