From: Dan Carpenter <dan.carpenter@oracle.com>
To: asamymuthupa@micron.com
Cc: Jens Axboe <axboe@kernel.dk>, linux-kernel@vger.kernel.org
Subject: re: mtip32xx: Add new bitwise flag 'dd_flag'
Date: Mon, 16 Apr 2012 14:12:45 +0300 [thread overview]
Message-ID: <20120416111245.GA26187@elgon.mountain> (raw)
Hello Asai Thambi S P,
The patch 45038367c271: "mtip32xx: Add new bitwise flag 'dd_flag'"
from Apr 9, 2012, leads to the following Smatch warning:
drivers/block/mtip32xx/mtip32xx.c:2516 mtip_hw_get_scatterlist()
warn: inconsistent returns sem:&dd->port->cmd_slot: locked (2514,2516) unlocked ()
@@ -2193,6 +2245,10 @@ static struct scatterlist *mtip_hw_get_scatterlist(struct driver_data *dd,
down(&dd->port->cmd_slot);
*tag = get_slot(dd->port);
+ if (unlikely(test_bit(MTIP_DD_FLAG_REMOVE_PENDING_BIT, &dd->dd_flag))) {
+ up(&dd->port->cmd_slot);
^^^^^^^^^^^^^^^^^^^^^^^
We release the lock here.
+ return NULL;
+ }
if (unlikely(*tag < 0))
return NULL;
^^^^^^^^^^^^
Should we release it here as well?
regards,
dan carpenter
next reply other threads:[~2012-04-16 11:12 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-04-16 11:12 Dan Carpenter [this message]
2012-04-16 19:21 ` mtip32xx: Add new bitwise flag 'dd_flag' Asai Thambi S P
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=20120416111245.GA26187@elgon.mountain \
--to=dan.carpenter@oracle.com \
--cc=asamymuthupa@micron.com \
--cc=axboe@kernel.dk \
--cc=linux-kernel@vger.kernel.org \
/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