* [patch] [SCSI] fnic: potential dead lock in fnic_is_abts_pending()
@ 2013-05-30 7:50 Dan Carpenter
2013-06-04 23:12 ` Hiral Patel (hiralpat)
0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2013-05-30 7:50 UTC (permalink / raw)
To: Hiral Patel
Cc: Suma Ramars, Brian Uchino, James E.J. Bottomley, linux-scsi,
kernel-janitors
There is an unlock missing if the == FNIC_IOREQ_ABTS_PENDING is
false.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
---
Static analysis. I can't test this.
diff --git a/drivers/scsi/fnic/fnic_scsi.c b/drivers/scsi/fnic/fnic_scsi.c
index be99e75..a97e6e5 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;
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [patch] [SCSI] fnic: potential dead lock in fnic_is_abts_pending()
2013-05-30 7:50 [patch] [SCSI] fnic: potential dead lock in fnic_is_abts_pending() Dan Carpenter
@ 2013-06-04 23:12 ` Hiral Patel (hiralpat)
0 siblings, 0 replies; 2+ messages in thread
From: Hiral Patel (hiralpat) @ 2013-06-04 23:12 UTC (permalink / raw)
To: Dan Carpenter
Cc: Suma Ramars (sramars), Brian Uchino (buchino),
James E.J. Bottomley, linux-scsi@vger.kernel.org,
kernel-janitors@vger.kernel.org
On 5/30/13 12:50 AM, "Dan Carpenter" <dan.carpenter@oracle.com> wrote:
>There is an unlock missing if the == FNIC_IOREQ_ABTS_PENDING is
>false.
>
>Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
>---
>Static analysis. I can't test this.
>
>diff --git a/drivers/scsi/fnic/fnic_scsi.c b/drivers/scsi/fnic/fnic_scsi.c
>index be99e75..a97e6e5 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;
Tested-by: Hiral Patel <hiralpat@cisco.com>
Acked-by: Hiral Patel <hiralpat@cisco.com>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-06-04 23:22 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-05-30 7:50 [patch] [SCSI] fnic: potential dead lock in fnic_is_abts_pending() Dan Carpenter
2013-06-04 23:12 ` Hiral Patel (hiralpat)
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).