Skip to content

Commit

Permalink
[SCSI] fnic: potential dead lock in fnic_is_abts_pending()
Browse files Browse the repository at this point in the history
There is an unlock missing if the == FNIC_IOREQ_ABTS_PENDING is
false.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Hiral Patel <hiralpat@cisco.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
  • Loading branch information
Dan Carpenter authored and James Bottomley committed Jun 27, 2013
1 parent 607be2c commit 5d65f91
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions drivers/scsi/fnic/fnic_scsi.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 5d65f91

Please sign in to comment.