From: Dave Chinner <david@fromorbit.com>
To: Ming Lei <tom.leiming@gmail.com>
Cc: linux-kernel@vger.kernel.org, Jens Axboe <axboe@kernel.dk>
Subject: Re: [OOPS, 3.13-rc2] null ptr in dio_complete()
Date: Fri, 6 Dec 2013 08:26:51 +1100 [thread overview]
Message-ID: <20131205212651.GP10988@dastard> (raw)
In-Reply-To: <20131205222220.5d7f4a48@tom-ThinkPad-T410>
On Thu, Dec 05, 2013 at 10:22:20PM +0800, Ming Lei wrote:
> On Wed, 4 Dec 2013 12:58:38 +1100
> Dave Chinner <david@fromorbit.com> wrote:
>
> >
> > And I just hit this from running xfs_repair which is doing
> > multithreaded direct IO directly on /dev/vdc:
.....
> > So this is looking like another virtio+blk_mq problem....
>
> This one might be caused by using-after-'free' request because the freed
> request may be allocated to another CPU immediately, and the below patch
> may be helpful, would you mind testing it?
>
> diff --git a/block/blk-mq.c b/block/blk-mq.c
> index 6875736..2358bdf 100644
> --- a/block/blk-mq.c
> +++ b/block/blk-mq.c
> @@ -311,12 +311,12 @@ void blk_mq_complete_request(struct request *rq, int error)
>
> blk_account_io_completion(rq, bytes);
>
> + blk_account_io_done(rq);
> +
> if (rq->end_io)
> rq->end_io(rq, error);
> else
> blk_mq_free_request(rq);
> -
> - blk_account_io_done(rq);
> }
>
> void __blk_mq_end_io(struct request *rq, int error)
Testing it now. I'll let you know how it goes in couple of hours.
Cheers,
Dave.
--
Dave Chinner
david@fromorbit.com
next prev parent reply other threads:[~2013-12-05 21:26 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-03 21:59 [OOPS, 3.13-rc2] null ptr in dio_complete() Dave Chinner
2013-12-04 1:58 ` Dave Chinner
2013-12-04 3:38 ` Dave Chinner
2013-12-04 3:47 ` Jens Axboe
2013-12-04 4:17 ` Dave Chinner
2013-12-04 23:56 ` Dave Chinner
2013-12-05 3:41 ` Jens Axboe
2013-12-05 4:49 ` Dave Chinner
2013-12-05 14:22 ` Ming Lei
2013-12-05 15:57 ` Jens Axboe
2013-12-05 21:26 ` Dave Chinner [this message]
2013-12-05 23:16 ` Dave Chinner
2013-12-06 16:46 ` 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=20131205212651.GP10988@dastard \
--to=david@fromorbit.com \
--cc=axboe@kernel.dk \
--cc=linux-kernel@vger.kernel.org \
--cc=tom.leiming@gmail.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