Re: sd_setup_discard_cmnd: BUG: unable to handle kernel NULL pointer dereference at (null)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Jun 19, 2014 at 11:08:22PM -0400, Martin K. Petersen wrote:
> >>>>> "Stefan" == Stefan Priebe <- Profihost AG <s.priebe@xxxxxxxxxxxx>> 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

--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux