浏览代码

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 <jeremy@goop.org>
Signed-off-by: Christoph Lameter <clameter@sgi.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Christoph Lameter 17 年之前
父节点
当前提交
25e59881f1
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      arch/x86/mm/hugetlbpage.c

+ 1 - 1
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)];
 	page = &pte_page(*pte)[vpfn % (HPAGE_SIZE/PAGE_SIZE)];
 
 
-	WARN_ON(!PageCompound(page));
+	WARN_ON(!PageHead(page));
 
 
 	return page;
 	return page;
 }
 }