Commit fa24f391 authored by Elena Reshetova's avatar Elena Reshetova Committed by Marcelo Henrique Cerri

qla2xxx: prevent speculative execution

CVE-2017-5753
CVE-2017-5715

Real commit text tbd
Signed-off-by: default avatarElena Reshetova <elena.reshetova@intel.com>
Signed-off-by: default avatarTim Chen <tim.c.chen@linux.intel.com>
Signed-off-by: default avatarAndy Whitcroft <apw@canonical.com>
(cherry picked from commit a2ef3475fff03ae6fcdf07163d3a762e9811e3be)
Signed-off-by: default avatarAndy Whitcroft <apw@canonical.com>
parent 5f922fcb
......@@ -2302,10 +2302,12 @@ qlafx00_status_entry(scsi_qla_host_t *vha, struct rsp_que *rsp, void *pkt)
req = ha->req_q_map[que];
/* Validate handle. */
if (handle < req->num_outstanding_cmds)
if (handle < req->num_outstanding_cmds) {
gmb();
sp = req->outstanding_cmds[handle];
else
} else {
sp = NULL;
}
if (sp == NULL) {
ql_dbg(ql_dbg_io, vha, 0x3034,
......@@ -2653,10 +2655,12 @@ qlafx00_multistatus_entry(struct scsi_qla_host *vha,
req = ha->req_q_map[que];
/* Validate handle. */
if (handle < req->num_outstanding_cmds)
if (handle < req->num_outstanding_cmds) {
gmb();
sp = req->outstanding_cmds[handle];
else
} else {
sp = NULL;
}
if (sp == NULL) {
ql_dbg(ql_dbg_io, vha, 0x3044,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment