diff options
author | Hidetoshi Seto <seto.hidetoshi@jp.fujitsu.com> | 2006-02-09 17:42:55 -0500 |
---|---|---|
committer | Tony Luck <tony.luck@intel.com> | 2006-02-09 17:42:55 -0500 |
commit | a94746461765dae41fb82e4dac027d14af4d80d8 (patch) | |
tree | ce7fa53c3509c6564fad23e42c7737560b085b2d | |
parent | 1ff0be1534839dabec85f6d16dc36734f4e158bf (diff) |
[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 <seto.hidetoshi@jp.fujitsu.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
-rw-r--r-- | arch/ia64/kernel/mca_drv.c | 3 |
1 files changed, 3 insertions, 0 deletions
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, | |||
437 | * the process not have any locks of kernel. | 437 | * the process not have any locks of kernel. |
438 | */ | 438 | */ |
439 | 439 | ||
440 | /* Is minstate valid? */ | ||
441 | if (!peidx_bottom(peidx) || !(peidx_bottom(peidx)->valid.minstate)) | ||
442 | return 0; | ||
440 | psr1 =(struct ia64_psr *)&(peidx_minstate_area(peidx)->pmsa_ipsr); | 443 | psr1 =(struct ia64_psr *)&(peidx_minstate_area(peidx)->pmsa_ipsr); |
441 | 444 | ||
442 | /* | 445 | /* |