mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-11-26 16:50:53 +07:00
scsi: qedi: off by one in qedi_get_cmd_from_tid()
The > here should be >= or we end up reading one element beyond the end
of the qedi->itt_map[] array. The qedi->itt_map[] array is allocated in
qedi_alloc_itt().
Fixes: ace7f46ba5
("scsi: qedi: Add QLogic FastLinQ offload iSCSI driver framework.")
Cc: <stable@vger.kernel.org> # v4.10+
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Manish Rangankar <Manish.Rangankar@cavium.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
This commit is contained in:
parent
47c4ccd308
commit
fa2d9d6e89
@ -1575,7 +1575,7 @@ struct qedi_cmd *qedi_get_cmd_from_tid(struct qedi_ctx *qedi, u32 tid)
|
||||
{
|
||||
struct qedi_cmd *cmd = NULL;
|
||||
|
||||
if (tid > MAX_ISCSI_TASK_ENTRIES)
|
||||
if (tid >= MAX_ISCSI_TASK_ENTRIES)
|
||||
return NULL;
|
||||
|
||||
cmd = qedi->itt_map[tid].p_cmd;
|
||||
|
Loading…
Reference in New Issue
Block a user