From 5d65f91896197bd047f97ed8e7792b06de491eac Mon Sep 17 00:00:00 2001 From: Dan Carpenter Date: Thu, 30 May 2013 10:50:46 +0300 Subject: [SCSI] fnic: potential dead lock in fnic_is_abts_pending() There is an unlock missing if the == FNIC_IOREQ_ABTS_PENDING is false. Signed-off-by: Dan Carpenter Acked-by: Hiral Patel Signed-off-by: James Bottomley --- drivers/scsi/fnic/fnic_scsi.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'drivers') diff --git a/drivers/scsi/fnic/fnic_scsi.c b/drivers/scsi/fnic/fnic_scsi.c index be99e7549d89..a97e6e584f8c 100644 --- a/drivers/scsi/fnic/fnic_scsi.c +++ b/drivers/scsi/fnic/fnic_scsi.c @@ -2432,11 +2432,9 @@ int fnic_is_abts_pending(struct fnic *fnic, struct scsi_cmnd *lr_sc) "Found IO in %s on lun\n", fnic_ioreq_state_to_str(CMD_STATE(sc))); - if (CMD_STATE(sc) == FNIC_IOREQ_ABTS_PENDING) { - spin_unlock_irqrestore(io_lock, flags); + if (CMD_STATE(sc) == FNIC_IOREQ_ABTS_PENDING) ret = 1; - continue; - } + spin_unlock_irqrestore(io_lock, flags); } return ret; -- cgit v1.2.3