1 From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
2 From: Elena Reshetova <elena.reshetova@intel.com>
3 Date: Mon, 4 Sep 2017 13:11:49 +0300
4 Subject: [PATCH] qla2xxx: prevent speculative execution
6 Content-Type: text/plain; charset=UTF-8
7 Content-Transfer-Encoding: 8bit
14 Signed-off-by: Elena Reshetova <elena.reshetova@intel.com>
15 Signed-off-by: Tim Chen <tim.c.chen@linux.intel.com>
16 Signed-off-by: Andy Whitcroft <apw@canonical.com>
17 Signed-off-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
18 (cherry picked from commit d71318e5f16371dbc0e89a786336a521551f8946)
19 Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
21 drivers/scsi/qla2xxx/qla_mr.c | 12 ++++++++----
22 1 file changed, 8 insertions(+), 4 deletions(-)
24 diff --git a/drivers/scsi/qla2xxx/qla_mr.c b/drivers/scsi/qla2xxx/qla_mr.c
25 index 10b742d27e16..ca923d8803f9 100644
26 --- a/drivers/scsi/qla2xxx/qla_mr.c
27 +++ b/drivers/scsi/qla2xxx/qla_mr.c
28 @@ -2304,10 +2304,12 @@ qlafx00_status_entry(scsi_qla_host_t *vha, struct rsp_que *rsp, void *pkt)
29 req = ha->req_q_map[que];
31 /* Validate handle. */
32 - if (handle < req->num_outstanding_cmds)
33 + if (handle < req->num_outstanding_cmds) {
35 sp = req->outstanding_cmds[handle];
42 ql_dbg(ql_dbg_io, vha, 0x3034,
43 @@ -2655,10 +2657,12 @@ qlafx00_multistatus_entry(struct scsi_qla_host *vha,
44 req = ha->req_q_map[que];
46 /* Validate handle. */
47 - if (handle < req->num_outstanding_cmds)
48 + if (handle < req->num_outstanding_cmds) {
50 sp = req->outstanding_cmds[handle];
57 ql_dbg(ql_dbg_io, vha, 0x3044,