From: Lars Ellenberg <lars.ellenberg@linbit.com>
To: "Martin K. Petersen" <martin.petersen@oracle.com>
Cc: Stefan Priebe - Profihost AG <s.priebe@profihost.ag>,
NeilBrown <neilb@suse.de>,
linux-raid@vger.kernel.org,
linux-scsi <linux-scsi@vger.kernel.org>,
JBottomley@parallels.com, Jens Axboe <axboe@kernel.dk>,
konrad.wilk@oracle.com, elder@linaro.org,
Josh Durgin <josh.durgin@inktank.com>,
Greg KH <gregkh@linuxfoundation.org>
Subject: Re: sd_setup_discard_cmnd: BUG: unable to handle kernel NULL pointer dereference at (null)
Date: Fri, 20 Jun 2014 17:53:21 +0200 [thread overview]
Message-ID: <20140620155321.GA24389@soda.linbit> (raw)
In-Reply-To: <yq1ionwjn15.fsf@sermon.lab.mkp.net>
On Thu, Jun 19, 2014 at 11:08:22PM -0400, Martin K. Petersen wrote:
> >>>>> "Stefan" == Stefan Priebe <- Profihost AG <s.priebe@profihost.ag>> writes:
>
> Stefan> Hi, while using vanilla 3.10.44 with drbd on top of a md raid1.
>
> Stefan> I'm pretty often hitting the followin kernel bug.
>
> Stefan> [<ffffffff8128105c>] blk_add_request_payload+0xc/0x90
>
> That's really messed up. This means we received a request with no bio.
No.
That means you received a bio that has been allocated with
bio_alloc(... , nr_iovecs = 0);
thus bio->bi_io_vec is NULL,
but blk_add_request_payload insists on using it anyways.
Even though it also requires that bio->bi_vcnt = 0
(because it then explicitly sets that to 1).
This is some subtlety with discard requests that has bitten some
stacking drivers now.
Any bio allocated that will be passed down with REQ_DISCARD
has to be allocated with nr_iovecs = 1 (at least),
even though it must not contain any bio_vec payload.
Though DRBD in 3.10 is not supposed to accept discard requests.
So I'm not sure how it manages to pass them down?
Lars
next prev parent reply other threads:[~2014-06-20 15:53 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-19 7:02 sd_setup_discard_cmnd: BUG: unable to handle kernel NULL pointer dereference at (null) Stefan Priebe - Profihost AG
2014-06-20 3:08 ` Martin K. Petersen
2014-06-20 15:53 ` Lars Ellenberg [this message]
2014-06-20 16:49 ` Martin K. Petersen
2014-06-20 18:29 ` Lars Ellenberg
2014-06-21 17:48 ` Stefan Priebe
2014-06-23 13:38 ` Lars Ellenberg
2014-06-23 19:37 ` Martin K. Petersen
2014-06-24 11:53 ` Lars Ellenberg
2014-06-24 23:11 ` Martin K. Petersen
2014-06-25 10:14 ` Lars Ellenberg
2014-06-26 1:44 ` Martin K. Petersen
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=20140620155321.GA24389@soda.linbit \
--to=lars.ellenberg@linbit.com \
--cc=JBottomley@parallels.com \
--cc=axboe@kernel.dk \
--cc=elder@linaro.org \
--cc=gregkh@linuxfoundation.org \
--cc=josh.durgin@inktank.com \
--cc=konrad.wilk@oracle.com \
--cc=linux-raid@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.com \
--cc=neilb@suse.de \
--cc=s.priebe@profihost.ag \
/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