scsi: qedi: off by one in qedi_get_cmd_from_tid()
authorDan Carpenter <dan.carpenter@oracle.com>
Fri, 25 Aug 2017 10:36:57 +0000 (13:36 +0300)
committerMartin K. Petersen <martin.petersen@oracle.com>
Tue, 29 Aug 2017 02:12:39 +0000 (22:12 -0400)
commitfa2d9d6e894e096678a50ef0f65f7a8c3d8a40b8
tree4a221ee623ee4de65d6ab07e7e0066270f7fe7d0
parent47c4ccd3086139d2085e0f1e59c0f26e8ce4ff46
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: ace7f46ba5fd ("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>
drivers/scsi/qedi/qedi_main.c