This is a note to let you know that I've just added the patch titled Fix bug in blk_rq_merge_ok to the 3.19-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: fix-bug-in-blk_rq_merge_ok.patch and it can be found in the queue-3.19 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. >From 7ee8e4f3983c4ff700958a6099c8fd212ea67b94 Mon Sep 17 00:00:00 2001 From: Wenbo Wang <wenbo.wang@xxxxxxxxxxxx> Date: Fri, 20 Mar 2015 01:04:54 -0400 Subject: Fix bug in blk_rq_merge_ok From: Wenbo Wang <wenbo.wang@xxxxxxxxxxxx> commit 7ee8e4f3983c4ff700958a6099c8fd212ea67b94 upstream. Use the right array index to reference the last element of rq->biotail->bi_io_vec[] Signed-off-by: Wenbo Wang <wenbo.wang@xxxxxxxxxxxx> Reviewed-by: Chong Yuan <chong.yuan@xxxxxxxxxxxx> Fixes: 66cb45aa41315 ("block: add support for limiting gaps in SG lists") Signed-off-by: Jens Axboe <axboe@xxxxxx> Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- block/blk-merge.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/block/blk-merge.c +++ b/block/blk-merge.c @@ -609,7 +609,7 @@ bool blk_rq_merge_ok(struct request *rq, if (q->queue_flags & (1 << QUEUE_FLAG_SG_GAPS)) { struct bio_vec *bprev; - bprev = &rq->biotail->bi_io_vec[bio->bi_vcnt - 1]; + bprev = &rq->biotail->bi_io_vec[rq->biotail->bi_vcnt - 1]; if (bvec_gap_to_prev(bprev, bio->bi_io_vec[0].bv_offset)) return false; } Patches currently in stable-queue which might be from wenbo.wang@xxxxxxxxxxxx are queue-3.19/fix-bug-in-blk_rq_merge_ok.patch -- To unsubscribe from this list: send the line "unsubscribe stable" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html