aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHannes Reinecke <[email protected]>2020-05-15 13:26:47 +0200
committerMartin K. Petersen <[email protected]>2020-10-02 21:09:26 -0400
commit712582e60f288e7cede8d6fc8769529317e0f3e0 (patch)
tree226f5610120e4ab99c89a50129c1099135f38c71
parent6500251e590657066a227dce897a0392f302af24 (diff)
scsi: fnic: Do not call 'scsi_done()' for unhandled commands
The fnic drivers assigns an ioreq structure to each command and severs this assignment once scsi_done() has been called and the command has been completed. When traversing commands to terminate outstanding I/O we should not call scsi_done() on commands which do not have a corresponding ioreq structure; these commands have either never entered the driver or have already been completed. [mkp: fixed unused label warning] Link: https://lore.kernel.org/r/[email protected] Reported-by: kbuild test robot <[email protected]> Reviewed-by: Laurence Oberman <[email protected]> Acked-by: Satish Kharat <[email protected]> Acked-by: Karan Tilak Kumar <[email protected]> Signed-off-by: Hannes Reinecke <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
-rw-r--r--drivers/scsi/fnic/fnic_scsi.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/scsi/fnic/fnic_scsi.c b/drivers/scsi/fnic/fnic_scsi.c
index 03b1805b106c..d1f7b84bbfe8 100644
--- a/drivers/scsi/fnic/fnic_scsi.c
+++ b/drivers/scsi/fnic/fnic_scsi.c
@@ -1402,7 +1402,7 @@ static void fnic_cleanup_io(struct fnic *fnic, int exclude_id)
}
if (!io_req) {
spin_unlock_irqrestore(io_lock, flags);
- goto cleanup_scsi_cmd;
+ continue;
}
CMD_SP(sc) = NULL;
@@ -1417,7 +1417,6 @@ static void fnic_cleanup_io(struct fnic *fnic, int exclude_id)
fnic_release_ioreq_buf(fnic, io_req, sc);
mempool_free(io_req, fnic->io_req_pool);
-cleanup_scsi_cmd:
sc->result = DID_TRANSPORT_DISRUPTED << 16;
FNIC_SCSI_DBG(KERN_DEBUG, fnic->lport->host,
"%s: tag:0x%x : sc:0x%p duration = %lu DID_TRANSPORT_DISRUPTED\n",