mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-12-28 13:34:38 +08:00
[SCSI] qla4xxx: Correct the validation to check in get_sys_info mailbox
Check mbox_sts[3] instead of mbox_sts[4] for ISP83xx to validate size of data returned Signed-off-by: Nilesh Javali <nilesh.javali@qlogic.com> Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com> Reviewed-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
This commit is contained in:
parent
e951aca1be
commit
e19dd66f10
@ -3427,11 +3427,11 @@ int qla4_8xxx_get_sys_info(struct scsi_qla_host *ha)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Make sure we receive the minimum required data to cache internally */
|
/* Make sure we receive the minimum required data to cache internally */
|
||||||
if (mbox_sts[4] < offsetof(struct mbx_sys_info, reserved)) {
|
if ((is_qla8032(ha) ? mbox_sts[3] : mbox_sts[4]) <
|
||||||
|
offsetof(struct mbx_sys_info, reserved)) {
|
||||||
DEBUG2(printk("scsi%ld: %s: GET_SYS_INFO data receive"
|
DEBUG2(printk("scsi%ld: %s: GET_SYS_INFO data receive"
|
||||||
" error (%x)\n", ha->host_no, __func__, mbox_sts[4]));
|
" error (%x)\n", ha->host_no, __func__, mbox_sts[4]));
|
||||||
goto exit_validate_mac82;
|
goto exit_validate_mac82;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Save M.A.C. address & serial_number */
|
/* Save M.A.C. address & serial_number */
|
||||||
|
Loading…
Reference in New Issue
Block a user