anolis: sw64: megaraid: fix kernel panic caused by accessing an illegal address
ANBZ: #4688 On SUBARCH_C3B, when using the original driver for LSI MegaRAID SAS-3 PCIe card, a kernel panic may arise from accessing an illegal address. Make some changes for SUBARCH_C3B to avoid it. But it may not be avoided entirely. Signed-off-by: Gu Zitao <guzitao@wxiat.com> Reviewed-by: He Sheng <hesheng@wxiat.com> Signed-off-by: Gu Zitao <guzitao@wxiat.com> Reviewed-by: Gu Mi <gumi@linux.alibaba.com> Reviewed-by: Guixin Liu <kanie@linux.alibaba.com> Link: https://gitee.com/anolis/cloud-kernel/pulls/1659
This commit is contained in:
parent
731d67be41
commit
513839732d
|
@ -3503,6 +3503,14 @@ complete_cmd_fusion(struct megasas_instance *instance, u32 MSIxIndex,
|
|||
d_val.u.high != cpu_to_le32(UINT_MAX)) {
|
||||
|
||||
smid = le16_to_cpu(reply_desc->SMID);
|
||||
#ifdef CONFIG_SUBARCH_C3B
|
||||
if (smid == 0xffff) {
|
||||
smid = d_val.u.low >> 16;
|
||||
if (smid == 0xffff)
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
|
||||
cmd_fusion = fusion->cmd_list[smid - 1];
|
||||
scsi_io_req = (struct MPI2_RAID_SCSI_IO_REQUEST *)
|
||||
cmd_fusion->io_request;
|
||||
|
|
Loading…
Reference in New Issue