Skip to content

Commit fa2d9d6

Browse files
Dan Carpentermartinkpetersen
authored andcommitted
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: ace7f46 ("scsi: qedi: Add QLogic FastLinQ offload iSCSI driver framework.") Cc: <[email protected]> # v4.10+ Signed-off-by: Dan Carpenter <[email protected]> Acked-by: Manish Rangankar <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
1 parent 47c4ccd commit fa2d9d6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/scsi/qedi/qedi_main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1575,7 +1575,7 @@ struct qedi_cmd *qedi_get_cmd_from_tid(struct qedi_ctx *qedi, u32 tid)
15751575
{
15761576
struct qedi_cmd *cmd = NULL;
15771577

1578-
if (tid > MAX_ISCSI_TASK_ENTRIES)
1578+
if (tid >= MAX_ISCSI_TASK_ENTRIES)
15791579
return NULL;
15801580

15811581
cmd = qedi->itt_map[tid].p_cmd;

0 commit comments

Comments
 (0)