Commit 7e15c47e authored by Jens Axboe's avatar Jens Axboe Committed by Linus Torvalds

[PATCH] [PATCH] Fix bounced bio and dm panic

Make sure that a bio doesn't contain NULL pages in the front of its vec,
if a device bounces a bio that doesn't start from 0.

Problem noted by Mark Haverkamp.
Signed-off-by: default avatarJens Axboe <axboe@suse.de>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent ca432005
...@@ -425,7 +425,7 @@ static void __blk_queue_bounce(request_queue_t *q, struct bio **bio_orig, ...@@ -425,7 +425,7 @@ static void __blk_queue_bounce(request_queue_t *q, struct bio **bio_orig,
* at least one page was bounced, fill in possible non-highmem * at least one page was bounced, fill in possible non-highmem
* pages * pages
*/ */
bio_for_each_segment(from, *bio_orig, i) { __bio_for_each_segment(from, *bio_orig, i, 0) {
to = bio_iovec_idx(bio, i); to = bio_iovec_idx(bio, i);
if (!to->bv_page) { if (!to->bv_page) {
to->bv_page = from->bv_page; to->bv_page = from->bv_page;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment