Re: [PATCH] bcache: fix NULL pointer deref in blk_add_request_payload

2014-02-19 Thread Lars Ellenberg
On Wed, Feb 19, 2014 at 01:07:14PM +, Lars Ellenberg wrote: > bch_generic_make_request_hack() tries to be smart, > and fake a bi_max_bvecs = bi_vcnt. I meant to include a cover letter with the Oops backtrace, and this: Note that this patch is relevant for 3.13 and before. With 3.14, this who

[PATCH] bcache: fix NULL pointer deref in blk_add_request_payload

2014-02-19 Thread Lars Ellenberg
bch_generic_make_request_hack() tries to be smart, and fake a bi_max_bvecs = bi_vcnt. If those bios have been REQ_DISCARD, and get submitted to a driver (md raid) that uses bio_clone, the clone will end up with bi_io_vec == NULL, passed down the stack, end up in sd_prep_fn and blk_add_request_payl