]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
[IA64] mca_drv: Add minstate validation
authorHidetoshi Seto <seto.hidetoshi@jp.fujitsu.com>
Thu, 9 Feb 2006 22:42:55 +0000 (14:42 -0800)
committerTony Luck <tony.luck@intel.com>
Thu, 9 Feb 2006 22:42:55 +0000 (14:42 -0800)
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>
Signed-off-by: Tony Luck <tony.luck@intel.com>
arch/ia64/kernel/mca_drv.c

index 3492e3211a4416ce615a1d0f14810be94aa6178d..8fd93afa75a7bea9a2b687d70537ce21c8094164 100644 (file)
@@ -437,6 +437,9 @@ recover_from_read_error(slidx_table_t *slidx,
         *    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);
 
        /*