mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 02:32:09 -04:00
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 <[email protected]> Reviewed-by: Nicholas Bellinger <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
This commit is contained in:
parent
68c59fcea1
commit
fb2028a0b2
1 changed files with 1 additions and 1 deletions
|
|
@ -3747,7 +3747,7 @@ static struct qla_tgt_cmd *qlt_ctio_to_cmd(struct scsi_qla_host *vha,
|
|||
h &= QLA_CMD_HANDLE_MASK;
|
||||
|
||||
if (h != QLA_TGT_NULL_HANDLE) {
|
||||
if (unlikely(h > req->num_outstanding_cmds)) {
|
||||
if (unlikely(h >= req->num_outstanding_cmds)) {
|
||||
ql_dbg(ql_dbg_tgt, vha, 0xe052,
|
||||
"qla_target(%d): Wrong handle %x received\n",
|
||||
vha->vp_idx, handle);
|
||||
|
|
|
|||
Loading…
Reference in a new issue