[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1448332531-10704-2-git-send-email-ming.lei@canonical.com>
Date: Tue, 24 Nov 2015 10:35:29 +0800
From: Ming Lei <ming.lei@...onical.com>
To: Jens Axboe <axboe@...nel.dk>, linux-kernel@...r.kernel.org
Cc: linux-block@...r.kernel.org, Christoph Hellwig <hch@...radead.org>,
Michael Ellerman <mpe@...erman.id.au>,
Laurent Dufour <ldufour@...ux.vnet.ibm.com>,
Mark Salter <msalter@...hat.com>,
Hannes Reinecke <hare@...e.de>,
Pratyush Anand <panand@...hat.com>,
Ming Lei <ming.lei@...onical.com>, stable@...nel.org
Subject: [PATCH 1/3] block: fix segment split
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@...nel.org #4.3
Reported-by: Michael Ellerman <mpe@...erman.id.au>
Reported-by: Mark Salter <msalter@...hat.com>
Tested-by: Laurent Dufour <ldufour@...ux.vnet.ibm.com>
Tested-by: Mark Salter <msalter@...hat.com>
Signed-off-by: Ming Lei <ming.lei@...onical.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@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists