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

Changed files
+5 -2
block
fs
+2 -1
block/bio.c
··· 1261 1261 if (ret) 1262 1262 goto cleanup; 1263 1263 } else { 1264 - zero_fill_bio(bio); 1264 + if (bmd->is_our_pages) 1265 + zero_fill_bio(bio); 1265 1266 iov_iter_advance(iter, bio->bi_iter.bi_size); 1266 1267 } 1267 1268
+1 -1
block/blk-zoned.c
··· 378 378 struct page *page; 379 379 int order; 380 380 381 - for (order = get_order(size); order > 0; order--) { 381 + for (order = get_order(size); order >= 0; order--) { 382 382 page = alloc_pages_node(node, GFP_NOIO | __GFP_ZERO, order); 383 383 if (page) { 384 384 *nr_zones = min_t(unsigned int, *nr_zones,
+2
fs/aio.c
··· 45 45 46 46 #include <asm/kmap_types.h> 47 47 #include <linux/uaccess.h> 48 + #include <linux/nospec.h> 48 49 49 50 #include "internal.h" 50 51 ··· 1039 1038 if (!table || id >= table->nr) 1040 1039 goto out; 1041 1040 1041 + id = array_index_nospec(id, table->nr); 1042 1042 ctx = rcu_dereference(table->table[id]); 1043 1043 if (ctx && ctx->user_id == ctx_id) { 1044 1044 if (percpu_ref_tryget_live(&ctx->users))