Skip to content

Commit

Permalink
[IA64] mca_drv: Add minstate validation
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Hidetoshi Seto authored and Tony Luck committed Feb 9, 2006
1 parent 1ff0be1 commit a947464
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions arch/ia64/kernel/mca_drv.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

/*
Expand Down

0 comments on commit a947464

Please sign in to comment.