projects
/
platform
/
kernel
/
linux-rpi.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a521bbc
)
scsi: qedf: Check the validity of rjt frame before processing
author
Saurav Kashyap
<skashyap@marvell.com>
Fri, 7 Aug 2020 11:06:51 +0000
(
04:06
-0700)
committer
Martin K. Petersen
<martin.petersen@oracle.com>
Fri, 21 Aug 2020 01:41:51 +0000
(21:41 -0400)
This is reported by Klockwork.
Link:
https://lore.kernel.org/r/20200807110656.19965-3-jhasan@marvell.com
Signed-off-by: Saurav Kashyap <skashyap@marvell.com>
Signed-off-by: Javed Hasan <jhasan@marvell.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/qedf/qedf_els.c
patch
|
blob
|
history
diff --git
a/drivers/scsi/qedf/qedf_els.c
b/drivers/scsi/qedf/qedf_els.c
index
542ba94
..
ab4b1a9
100644
(file)
--- a/
drivers/scsi/qedf/qedf_els.c
+++ b/
drivers/scsi/qedf/qedf_els.c
@@
-883,6
+883,11
@@
static void qedf_rec_compl(struct qedf_els_cb_arg *cb_arg)
opcode = fc_frame_payload_op(fp);
if (opcode == ELS_LS_RJT) {
rjt = fc_frame_payload_get(fp, sizeof(*rjt));
+ if (!rjt) {
+ QEDF_ERR(&qedf->dbg_ctx, "payload get failed");
+ goto out_free_frame;
+ }
+
QEDF_INFO(&(qedf->dbg_ctx), QEDF_LOG_ELS,
"Received LS_RJT for REC: er_reason=0x%x, "
"er_explan=0x%x.\n", rjt->er_reason, rjt->er_explan);