From: scameron@beardog.cce.hp.com
To: Dan Carpenter <error27@gmail.com>,
Mike Miller <mike.miller@hp.com>,
Jens Axboe <jens.axboe@oracle.com>,
Andrew Morton <akpm@linux-foundation.org>,
iss_storagedev@hp.com, linux-kernel@vger.kernel.org,
kernel-janitors@vger.kernel.org
Subject: Re: [patch] cciss: unlock on error path
Date: Thu, 1 Apr 2010 11:33:56 -0500 [thread overview]
Message-ID: <20100401163356.GQ12755@beardog.cce.hp.com> (raw)
In-Reply-To: <20100401155404.GD5265@bicker>
On Thu, Apr 01, 2010 at 06:54:04PM +0300, Dan Carpenter wrote:
> We take the spin_lock again in fail_all_cmds() so we need to unlock
> here.
>
> Signed-off-by: Dan Carpenter <error27@gmail.com>
> ---
> This was found by a static checker and I don't have the hardware myself.
> Please review carefully.
>
> diff --git a/drivers/block/cciss.c b/drivers/block/cciss.c
> index 9e3af30..eb5ff05 100644
> --- a/drivers/block/cciss.c
> +++ b/drivers/block/cciss.c
> @@ -3341,6 +3341,7 @@ static irqreturn_t do_cciss_intr(int irq, void *dev_id)
> printk(KERN_WARNING
> "cciss: controller cciss%d failed, stopping.\n",
> h->ctlr);
> + spin_unlock_irqrestore(CCISS_LOCK(h->ctlr), flags);
> fail_all_cmds(h->ctlr);
> return IRQ_HANDLED;
> }
Looks ok to me. (Seems like I've seen this patch before).
It's pretty much a paranoid "never happen" case anyway.
To hit this, the hardware would have to return a tag that was marked as
containing an index, and then the index would have to be out of bounds,
so either, it would have to be broken driver, broken firmware or
broken hardware.
Really, one of these days, the interrupt handler should probably be
cleaned up to be more like what's in the hpsa driver.
-- steve
next prev parent reply other threads:[~2010-04-01 16:30 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-04-01 15:54 [patch] cciss: unlock on error path Dan Carpenter
2010-04-01 16:33 ` scameron [this message]
2010-04-02 6:39 ` Jens Axboe
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=20100401163356.GQ12755@beardog.cce.hp.com \
--to=scameron@beardog.cce.hp.com \
--cc=akpm@linux-foundation.org \
--cc=error27@gmail.com \
--cc=iss_storagedev@hp.com \
--cc=jens.axboe@oracle.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mike.miller@hp.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