From: Jens Axboe <jens.axboe@oracle.com>
To: Tejun Heo <htejun@gmail.com>
Cc: James Bottomley <James.Bottomley@HansenPartnership.com>,
linux-scsi <linux-scsi@vger.kernel.org>
Subject: Re: [PATCH] block: fix oops with block tag queueing
Date: Wed, 27 May 2009 06:27:10 +0200 [thread overview]
Message-ID: <20090527042710.GP11363@kernel.dk> (raw)
In-Reply-To: <4A1C72FE.2040604@gmail.com>
On Wed, May 27 2009, Tejun Heo wrote:
> James Bottomley wrote:
> > On Thu, 2009-05-21 at 10:55 +0900, Tejun Heo wrote:
> >> James Bottomley wrote:
> >>> commit e8939a50466fd963eb1ba9118c34b9ffb7ff6aa6
> >>> Author: Tejun Heo <tj@kernel.org>
> >>> Date: Fri May 8 11:54:16 2009 +0900
> >>>
> >>> block: implement and enforce request peek/start/fetch
> >>>
> >>> Added a BUG_ON(blk_queued_rq(req)) to the top of blk_finish_req().
> >>> Unfortunately, this checks whether req->queuelist is empty. This list
> >>> is doing double duty both as the queue list and the tag list, so tagged
> >>> requests come in here with this not empty and boom (the tag list is
> >>> emptied by blk_queue_end_tag() lower down).
> >>>
> >>> Fix this by moving the BUG_ON to below the end tag we also seem
> >>> vulnerable to this in blk_requeue_request() as well. I think all uses
> >>> of blk_queued_rq() need auditing because the check is clearly wrong in
> >>> the tagged case.
> >>>
> >>> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
> >> Oops,
> >>
> >> Acked-by: Tejun Heo <tj@kernel.org>
> >>
> >> There are also some drivers which use queuelist for internal purposes
> >> after dequeueing, which also screws up blk_queued_rq() test in
> >> addition to being questionable practice to begin with. Maybe we would
> >> be better off with a flag?
> >
> > Either is fine by me ... could we get some fix in, please? I'm
> > currently carrying this below the merge-base on the SCSI postmerge tree
> > to prevent my main build server oopsing under SCSI testing ... I'm a bit
> > surprised we haven't had more reports from linux-oops ... but you can
> > bet that if Jens moves libata to generic tag use, that will change ...
>
> For now, I think your patch is fine and thus the Acked-by. Jens?
Yes indeed, sorry for the delay. I'll commit it.
--
Jens Axboe
prev parent reply other threads:[~2009-05-27 4:27 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-05-20 17:06 [PATCH] block: fix oops with block tag queueing James Bottomley
2009-05-21 1:55 ` Tejun Heo
2009-05-21 16:47 ` Boaz Harrosh
2009-05-21 23:23 ` Tejun Heo
2009-05-26 15:58 ` James Bottomley
2009-05-26 22:53 ` Tejun Heo
2009-05-27 4:27 ` Jens Axboe [this message]
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=20090527042710.GP11363@kernel.dk \
--to=jens.axboe@oracle.com \
--cc=James.Bottomley@HansenPartnership.com \
--cc=htejun@gmail.com \
--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).