浏览代码

[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>
Hidetoshi Seto 19 年之前
父节点
当前提交
a947464617
共有 1 个文件被更改,包括 3 次插入0 次删除
  1. 3 0
      arch/ia64/kernel/mca_drv.c

+ 3 - 0
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.
 	 *    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);
 	psr1 =(struct ia64_psr *)&(peidx_minstate_area(peidx)->pmsa_ipsr);
 
 
 	/*
 	/*