summaryrefslogtreecommitdiff
path: root/drivers/block
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@gmail.com>2018-05-08 21:33:54 -0400
committerJens Axboe <axboe@kernel.dk>2018-05-14 13:16:10 -0600
commit45db54d58de0b7171fe1f0d1dfc14378e464949e (patch)
tree7710877ae0fa69ef957a8087785fb1e7e0d1e06d /drivers/block
parent38a72dac48f631c2a90b831a3847cde116f21d3a (diff)
block: Split out bio_list_copy_data()
Found a bug (with ASAN) where we were passing a bio to bio_copy_data() with bi_next not NULL, when it should have been - a driver had left bi_next set to something after calling bio_endio(). Since the normal case is only copying single bios, split out bio_list_copy_data() to avoid more bugs like this in the future. Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'drivers/block')
-rw-r--r--drivers/block/pktcdvd.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/block/pktcdvd.c b/drivers/block/pktcdvd.c
index ccfcf544830f..d8aff7f3256a 100644
--- a/drivers/block/pktcdvd.c
+++ b/drivers/block/pktcdvd.c
@@ -1285,7 +1285,7 @@ static void pkt_start_write(struct pktcdvd_device *pd, struct packet_data *pkt)
* Fill-in bvec with data from orig_bios.
*/
spin_lock(&pkt->lock);
- bio_copy_data(pkt->w_bio, pkt->orig_bios.head);
+ bio_list_copy_data(pkt->w_bio, pkt->orig_bios.head);
pkt_set_state(pkt, PACKET_WRITE_WAIT_STATE);
spin_unlock(&pkt->lock);