Skip to content

Commit fb2028a

Browse files
Dan Carpentermartinkpetersen
authored andcommitted
scsi: qla2xxx: Off by one in qlt_ctio_to_cmd()
There are "req->num_outstanding_cmds" elements in the req->outstanding_cmds[] array so the > here should be >=. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Reviewed-by: Nicholas Bellinger <nab@linux-iscsi.org> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
1 parent 68c59fc commit fb2028a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/scsi/qla2xxx/qla_target.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3747,7 +3747,7 @@ static struct qla_tgt_cmd *qlt_ctio_to_cmd(struct scsi_qla_host *vha,
37473747
h &= QLA_CMD_HANDLE_MASK;
37483748

37493749
if (h != QLA_TGT_NULL_HANDLE) {
3750-
if (unlikely(h > req->num_outstanding_cmds)) {
3750+
if (unlikely(h >= req->num_outstanding_cmds)) {
37513751
ql_dbg(ql_dbg_tgt, vha, 0xe052,
37523752
"qla_target(%d): Wrong handle %x received\n",
37533753
vha->vp_idx, handle);

0 commit comments

Comments
 (0)