linux-scsi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] lpfc: check for valid scsi cmnd in lpfc_scsi_cmd_iocb_cmpl()
@ 2017-11-13  7:22 Hannes Reinecke
  0 siblings, 0 replies; only message in thread
From: Hannes Reinecke @ 2017-11-13  7:22 UTC (permalink / raw)
  To: Martin K. Petersen
  Cc: James Bottomley, Christoph Hellwig, linux-scsi, Hannes Reinecke,
	Hannes Reinecke

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

Signed-off-by: Hannes Reinecke <hare@suse.com>
---
 drivers/scsi/lpfc/lpfc_scsi.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/scsi/lpfc/lpfc_scsi.c b/drivers/scsi/lpfc/lpfc_scsi.c
index 1a6f122..dfdca1d 100644
--- a/drivers/scsi/lpfc/lpfc_scsi.c
+++ b/drivers/scsi/lpfc/lpfc_scsi.c
@@ -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);
-- 
1.8.5.6

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2017-11-13  7:22 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-11-13  7:22 [PATCH] lpfc: check for valid scsi cmnd in lpfc_scsi_cmd_iocb_cmpl() Hannes Reinecke

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).