public inbox for linux-ia64@vger.kernel.org
 help / color / mirror / Atom feed
From: Hidetoshi Seto <seto.hidetoshi@jp.fujitsu.com>
To: linux-ia64@vger.kernel.org
Subject: [PATCH] mca_drv: Add minstate validation
Date: Thu, 09 Feb 2006 06:43:05 +0000	[thread overview]
Message-ID: <43EAE479.4050606@jp.fujitsu.com> (raw)

MCA driver can cause panic if kernel gets a state info with no minstate.
This patch adds minstate validation before handling it.

signed-off-by: Hidetoshi Seto <seto.hidetoshi@jp.fujitsu.com>

-----

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

Index: linux-2.6.16-rc2/arch/ia64/kernel/mca_drv.c
=================================--- linux-2.6.16-rc2.orig/arch/ia64/kernel/mca_drv.c	2006-02-08 13:03:49.000000000 +0900
+++ linux-2.6.16-rc2/arch/ia64/kernel/mca_drv.c	2006-02-08 15:24:09.000000000 +0900
@@ -437,6 +437,9 @@
  	 *    the process not have any locks of kernel.
  	 */

+	/* Is minstate valid? */
+	if (!peidx_bottom(peidx) || !(peidx_bottom(peidx)->valid.minstate))
+		return 0;
  	psr1 =(struct ia64_psr *)&(peidx_minstate_area(peidx)->pmsa_ipsr);

  	/*



                 reply	other threads:[~2006-02-09  6:43 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=43EAE479.4050606@jp.fujitsu.com \
    --to=seto.hidetoshi@jp.fujitsu.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