Bart Van Assche 6a75405369 scsi: qla2xxx: Avoid that qlt_send_resp_ctio() corrupts memory
[ Upstream commit a861b49273578e255426a499842cf7f465456351 ]

The "(&ctio->u.status1.sense_data)[i]" where i >= 0 expressions in
qlt_send_resp_ctio() are probably typos and should have been
"(&ctio->u.status1.sense_data[4 * i])" instead. Instead of only fixing
these typos, modify the code for storing sense data such that it becomes
easy to read. This patch fixes a Coverity complaint about accessing an
array outside its bounds.

Cc: Himanshu Madhani <hmadhani@marvell.com>
Cc: Giridhar Malavali <gmalavali@marvell.com>
Fixes: be25152c0d9e ("qla2xxx: Improve T10-DIF/PI handling in driver.") # v4.11.
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Acked-by: Himanshu Madhani <hmadhani@marvell.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2020-01-27 14:46:31 +01:00
..
2019-02-12 19:46:13 +01:00
2020-01-23 08:20:31 +01:00
2018-01-02 20:31:05 +01:00
2017-08-25 17:21:11 -04:00
2018-08-15 18:12:47 +02:00
2017-08-25 17:21:10 -04:00
2019-12-01 09:13:27 +01:00
2017-08-25 17:21:11 -04:00
2017-09-07 12:12:43 -07:00
2017-08-08 11:49:51 -04:00