Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1276024
| From | Ming Lei <ming.lei@canonical.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH 1/3] block: fix segment split |
| Date | 2015-11-24 03:40 +0100 |
| Message-ID | <qybGp-1Y4-13@gated-at.bofh.it> (permalink) |
| References | <qybGp-1Y4-1@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
Inside blk_bio_segment_split(), previous bvec pointer(bvprvp) always points to the iterator local variable, which is obviously wrong, so fix it by pointing to the local variable of 'bvprv'. Fixes: 5014c311baa2b(block: fix bogus compiler warnings in blk-merge.c) Cc: stable@kernel.org #4.3 Reported-by: Michael Ellerman <mpe@ellerman.id.au> Reported-by: Mark Salter <msalter@redhat.com> Tested-by: Laurent Dufour <ldufour@linux.vnet.ibm.com> Tested-by: Mark Salter <msalter@redhat.com> Signed-off-by: Ming Lei <ming.lei@canonical.com> --- block/blk-merge.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/block/blk-merge.c b/block/blk-merge.c index de5716d8..f2efe8a 100644 --- a/block/blk-merge.c +++ b/block/blk-merge.c @@ -98,7 +98,7 @@ static struct bio *blk_bio_segment_split(struct request_queue *q, seg_size += bv.bv_len; bvprv = bv; - bvprvp = &bv; + bvprvp = &bvprv; sectors += bv.bv_len >> 9; continue; } @@ -108,7 +108,7 @@ new_segment: nsegs++; bvprv = bv; - bvprvp = &bv; + bvprvp = &bvprv; seg_size = bv.bv_len; sectors += bv.bv_len >> 9; } -- 1.9.1 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH 0/3] blk-merge: fix sg merge regression Ming Lei <ming.lei@canonical.com> - 2015-11-24 03:40 +0100 [PATCH 2/3] blk-merge: fix blk_bio_segment_split Ming Lei <ming.lei@canonical.com> - 2015-11-24 03:40 +0100 [PATCH 1/3] block: fix segment split Ming Lei <ming.lei@canonical.com> - 2015-11-24 03:40 +0100 [PATCH 3/3] blk-merge: warn if figured out segment number is bigger than nr_phys_segments Ming Lei <ming.lei@canonical.com> - 2015-11-24 03:40 +0100 Re: [PATCH 0/3] blk-merge: fix sg merge regression Jens Axboe <axboe@kernel.dk> - 2015-11-24 04:20 +0100
csiph-web