From: Jens Axboe <jens.axboe@oracle.com>
To: James Bottomley <James.Bottomley@HansenPartnership.com>
Cc: Tejun Heo <htejun@gmail.com>,
linux-scsi <linux-scsi@vger.kernel.org>,
linux-ide <linux-ide@vger.kernel.org>
Subject: Re: [PATCH block#for-2.6.31] block: fix an oops on BLKPREP_KILL
Date: Sat, 30 May 2009 06:41:37 +0200 [thread overview]
Message-ID: <20090530044137.GM11363@kernel.dk> (raw)
In-Reply-To: <1243635503.2919.67.camel@localhost.localdomain>
On Fri, May 29 2009, James Bottomley wrote:
> Doing a bit of torture testing, I ran across a BUG in the block
> subsystem (at blk-core.c:2048): the test for if the request is queued.
>
> It turns out the trigger was a BLKPREP_KILL coming out of the SCSI prep
> function. Currently for BLKPREP_KILL requests, we send them straight
> into __blk_end_request_all() with an error, but they've never been
> dequeued, so they trip the bug. Fix this by starting requests before
> killing them.
>
> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
>
> ---
>
> diff --git a/block/blk-core.c b/block/blk-core.c
> index 8b3b74e..9a0568c 100644
> --- a/block/blk-core.c
> +++ b/block/blk-core.c
> @@ -1789,6 +1789,7 @@ struct request *blk_peek_request(struct request_queue *q)
> break;
> } else if (ret == BLKPREP_KILL) {
> rq->cmd_flags |= REQ_QUIET;
> + blk_start_request(rq);
> __blk_end_request_all(rq, -EIO);
> } else {
> printk(KERN_ERR "%s: bad return=%d\n", __func__, ret);
Given how illogical that now looks, I think it could do with a comment.
I'll add that while applying.
--
Jens Axboe
next prev parent reply other threads:[~2009-05-30 4:41 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-05-29 22:18 [PATCH block#for-2.6.31] block: fix an oops on BLKPREP_KILL James Bottomley
2009-05-30 4:41 ` Jens Axboe [this message]
2009-05-30 14:23 ` James Bottomley
2009-05-31 6:11 ` 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=20090530044137.GM11363@kernel.dk \
--to=jens.axboe@oracle.com \
--cc=James.Bottomley@HansenPartnership.com \
--cc=htejun@gmail.com \
--cc=linux-ide@vger.kernel.org \
--cc=linux-scsi@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;
as well as URLs for NNTP newsgroup(s).