summaryrefslogtreecommitdiffstats
path: root/block/bio.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2018-12-14 12:18:30 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2018-12-14 12:18:30 -0800
commit380ef2c9ad4fdd5fdd81055857be21ae5f581877 (patch)
tree2d0406850494e77236e8eb20feb8c8d2889316ff /block/bio.c
parent743e3c8f19db951ce9d20e6accb290444f4737a4 (diff)
parent927b6b2d69b4cc900fa50d7e46d8f1fa91c91b3a (diff)
downloadlinux-380ef2c9ad4fdd5fdd81055857be21ae5f581877.tar.bz2
Merge tag 'for-linus-20181214' of git://git.kernel.dk/linux-block
Pull block fixes from Jens Axboe: "Three small fixes for this week. contains: - spectre indexing fix for aio (Jeff) - fix for the previous zeroing bio fix, we don't need it for user mapped pages, and in fact it breaks some applications if we do (Keith) - allocation failure fix for null_blk with zoned (Shin'ichiro)" * tag 'for-linus-20181214' of git://git.kernel.dk/linux-block: block: Fix null_blk_zoned creation failure with small number of zones aio: fix spectre gadget in lookup_ioctx block/bio: Do not zero user pages
Diffstat (limited to 'block/bio.c')
-rw-r--r--block/bio.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/block/bio.c b/block/bio.c
index 4f4d9884443b..4d86e90654b2 100644
--- a/block/bio.c
+++ b/block/bio.c
@@ -1261,7 +1261,8 @@ struct bio *bio_copy_user_iov(struct request_queue *q,
if (ret)
goto cleanup;
} else {
- zero_fill_bio(bio);
+ if (bmd->is_our_pages)
+ zero_fill_bio(bio);
iov_iter_advance(iter, bio->bi_iter.bi_size);
}