From: Hidetoshi Seto Date: Thu, 9 Feb 2006 22:42:55 +0000 (-0800) Subject: [IA64] mca_drv: Add minstate validation X-Git-Tag: MMI-PSA29.97-13-9~52104^2~1 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=a94746461765dae41fb82e4dac027d14af4d80d8;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git [IA64] mca_drv: Add minstate validation 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 Signed-off-by: Tony Luck --- diff --git a/arch/ia64/kernel/mca_drv.c b/arch/ia64/kernel/mca_drv.c index 3492e3211a44..8fd93afa75a7 100644 --- a/arch/ia64/kernel/mca_drv.c +++ b/arch/ia64/kernel/mca_drv.c @@ -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); /*