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. So 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. Signed-off-by: Hannes Reinecke <hare@xxxxxxxx> --- drivers/scsi/fnic/fnic_scsi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/scsi/fnic/fnic_scsi.c b/drivers/scsi/fnic/fnic_scsi.c index 27535c90b248..8d2798cbd30f 100644 --- a/drivers/scsi/fnic/fnic_scsi.c +++ b/drivers/scsi/fnic/fnic_scsi.c @@ -1401,7 +1401,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; -- 2.16.4