mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Christoph Lameter <clameter@sgi.com>
To: Ingo Molnar <mingo@elte.hu>
Cc: linux-kernel@vger.kernel.org, Jeremy Fitzhardinge <jeremy@goop.org>
Subject: [x86] Stricter check in follow_huge_addr()
Date: Wed, 26 Mar 2008 21:03:04 -0700 (PDT)	[thread overview]
Message-ID: <Pine.LNX.4.64.0803262101060.2683@schroedinger.engr.sgi.com> (raw)

From: Christoph Lameter <clameter@sgi.com>
Subject: Compound Pages: 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>
Cc: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Christoph Lameter <clameter@sgi.com>

---
 arch/x86/mm/hugetlbpage.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Index: linux-2.6.25-rc5-mm1/arch/x86/mm/hugetlbpage.c
===================================================================
--- linux-2.6.25-rc5-mm1.orig/arch/x86/mm/hugetlbpage.c	2008-03-26 20:43:56.796667401 -0700
+++ linux-2.6.25-rc5-mm1/arch/x86/mm/hugetlbpage.c	2008-03-26 20:44:55.526669888 -0700
@@ -178,7 +178,7 @@ follow_huge_addr(struct mm_struct *mm, u
 
 	page = &pte_page(*pte)[vpfn % (HPAGE_SIZE/PAGE_SIZE)];
 
-	WARN_ON(!PageCompound(page));
+	WARN_ON(!PageHead(page));
 
 	return page;
 }

             reply	other threads:[~2008-03-27  4:05 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-03-27  4:03 Christoph Lameter [this message]
2008-03-27  8:13 ` Ingo Molnar
2008-03-27 18:43   ` Christoph Lameter

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Pine.LNX.4.64.0803262101060.2683@schroedinger.engr.sgi.com \
    --to=clameter@sgi.com \
    --cc=jeremy@goop.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®