Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1481596 > unrolled thread

[PATCH 4.4 052/192] [PATCH 053/135] lpfc: Fix crash in fcp command completion path.

Started byGreg Kroah-Hartman <gregkh@linuxfoundation.org>
First post2016-09-12 19:10 +0200
Last post2016-09-12 19:10 +0200
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCH 4.4 052/192] [PATCH 053/135] lpfc: Fix crash in fcp command completion path. Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-09-12 19:10 +0200

#1481596 — [PATCH 4.4 052/192] [PATCH 053/135] lpfc: Fix crash in fcp command completion path.

FromGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Date2016-09-12 19:10 +0200
Subject[PATCH 4.4 052/192] [PATCH 053/135] lpfc: Fix crash in fcp command completion path.
Message-ID<sgCU4-6aZ-97@gated-at.bofh.it>
4.4-stable review patch.  If anyone has any objections, please let me know.

------------------

[ Upstream commit c90261dcd86e4eb5c9c1627fde037e902db8aefa ]

Fix crash in fcp command completion path.

Missed null check.

Signed-off-by: Dick Kennedy <dick.kennedy@avagotech.com>
Signed-off-by: James Smart <james.smart@avagotech.com>
Reviewed-by: Hannes Reinicke <hare@suse.de>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 drivers/scsi/lpfc/lpfc_scsi.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

--- a/drivers/scsi/lpfc/lpfc_scsi.c
+++ b/drivers/scsi/lpfc/lpfc_scsi.c
@@ -3908,9 +3908,9 @@ lpfc_scsi_cmd_iocb_cmpl(struct lpfc_hba
 	uint32_t logit = LOG_FCP;
 
 	/* Sanity check on return of outstanding command */
-	if (!(lpfc_cmd->pCmd))
-		return;
 	cmd = lpfc_cmd->pCmd;
+	if (!cmd)
+		return;
 	shost = cmd->device->host;
 
 	lpfc_cmd->result = (pIocbOut->iocb.un.ulpWord[4] & IOERR_PARAM_MASK);

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web