From: Dan Carpenter <dan.carpenter@oracle.com>
To: Hiral Patel <hiralpat@cisco.com>
Cc: Suma Ramars <sramars@cisco.com>, Brian Uchino <buchino@cisco.com>,
"James E.J. Bottomley" <JBottomley@parallels.com>,
linux-scsi@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: [patch] [SCSI] fnic: potential dead lock in fnic_is_abts_pending()
Date: Thu, 30 May 2013 10:50:46 +0300 [thread overview]
Message-ID: <20130530074926.GA8148@debian> (raw)
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;
next reply other threads:[~2013-05-30 7:51 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-05-30 7:50 Dan Carpenter [this message]
2013-06-04 23:12 ` [patch] [SCSI] fnic: potential dead lock in fnic_is_abts_pending() Hiral Patel (hiralpat)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20130530074926.GA8148@debian \
--to=dan.carpenter@oracle.com \
--cc=JBottomley@parallels.com \
--cc=buchino@cisco.com \
--cc=hiralpat@cisco.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=sramars@cisco.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).