Skip to contentSkip to conversation

lpfc: check for valid scsi cmnd in lpfc_scsi_cmd_iocb_cmpl()

PATCH New Hannes Reinecke 1 participant 1 message Nov 13, 2017

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 lpfc: check for valid scsi cmnd in lpfc_scsi_cmd_iocb_cmpl()

When the 'host_scribble' backpointer doesn't match we need to skip processing this command.

---
 drivers/scsi/lpfc/lpfc_scsi.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/scsi/lpfc/lpfc_scsi.c +2 -0
index 1a6f122..dfdca1d 100644
@@ -3938,6 +3938,8 @@ int lpfc_sli4_scmd_to_wqidx_distr(struct lpfc_hba *phba,
 	cmd = lpfc_cmd->pCmd;
 	if (!cmd)
 		return;
+	if (cmd->host_scribble != lpfc_cmd)
+		return;
 	shost = cmd->device->host;
 
 	lpfc_cmd->result = (pIocbOut->iocb.un.ulpWord[4] & IOERR_PARAM_MASK);
Signature · 1 line
1.8.5.6