diff options
author | Kent Overstreet <kent.overstreet@gmail.com> | 2018-05-09 04:33:54 +0300 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2018-05-14 22:16:10 +0300 |
commit | 45db54d58de0b7171fe1f0d1dfc14378e464949e (patch) | |
tree | 7710877ae0fa69ef957a8087785fb1e7e0d1e06d /include/linux/bio.h | |
parent | 38a72dac48f631c2a90b831a3847cde116f21d3a (diff) | |
download | linux-45db54d58de0b7171fe1f0d1dfc14378e464949e.tar.xz |
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 'include/linux/bio.h')
-rw-r--r-- | include/linux/bio.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/include/linux/bio.h b/include/linux/bio.h index 5a6ee955a8ac..98b175cc00d5 100644 --- a/include/linux/bio.h +++ b/include/linux/bio.h @@ -505,9 +505,10 @@ static inline void bio_flush_dcache_pages(struct bio *bi) } #endif -extern void bio_copy_data_iter(struct bio *dst, struct bvec_iter dst_iter, - struct bio *src, struct bvec_iter src_iter); +extern void bio_copy_data_iter(struct bio *dst, struct bvec_iter *dst_iter, + struct bio *src, struct bvec_iter *src_iter); extern void bio_copy_data(struct bio *dst, struct bio *src); +extern void bio_list_copy_data(struct bio *dst, struct bio *src); extern void bio_free_pages(struct bio *bio); extern struct bio *bio_copy_user_iov(struct request_queue *, |