public inbox for linux-ia64@vger.kernel.org
 help / color / mirror / Atom feed
From: Russ Anderson <rja@efs.americas.sgi.com>
To: linux-ia64@vger.kernel.org
Subject: [patch] MCA recovery verify pfn_valid
Date: Fri, 16 Sep 2005 21:54:53 +0000	[thread overview]
Message-ID: <200509162154.j8GLsrWN2681135@efs.americas.sgi.com> (raw)


Verify the pfn is valid before calling pfn_to_page().

Signed-off-by: Russ Anderson (rja@sgi.com)

---------------------------------------------------------------------
 arch/ia64/kernel/mca_drv.c |    3 +++
 1 files changed, 3 insertions(+)

Index: linux-2.6.git#test/arch/ia64/kernel/mca_drv.c
=================================--- linux-2.6.git#test.orig/arch/ia64/kernel/mca_drv.c	2005-09-16 16:28:11.857773257 -0500
+++ linux-2.6.git#test/arch/ia64/kernel/mca_drv.c	2005-09-16 16:29:32.119181669 -0500
@@ -87,6 +87,9 @@ mca_page_isolate(unsigned long paddr)
 	if ( !ia64_phys_addr_valid(paddr) ) 
 		return ISOLATE_NG;
 
+	if ( !pfn_valid(paddr))
+		return ISOLATE_OK;
+
 	/* convert physical address to physical page number */
 	p = pfn_to_page(paddr>>PAGE_SHIFT);
 

             reply	other threads:[~2005-09-16 21:54 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-09-16 21:54 Russ Anderson [this message]
2005-09-19 22:19 ` [patch] MCA recovery verify pfn_valid Russ Anderson
2005-09-20  7:34 ` Hidetoshi Seto
2005-09-20 22:07 ` Russ Anderson

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=200509162154.j8GLsrWN2681135@efs.americas.sgi.com \
    --to=rja@efs.americas.sgi.com \
    --cc=linux-ia64@vger.kernel.org \
    /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