* for-5.15/block: (115 commits)
null_blk: add error handling support for add_disk()
virtio_blk: add error handling support for add_disk()
block: add error handling for device_add_disk / add_disk
block: return errors from disk_alloc_events
block: return errors from blk_integrity_add
block: call blk_register_queue earlier in device_add_disk
block: call blk_integrity_add earlier in device_add_disk
block: create the bdi link earlier in device_add_disk
block: call bdev_add later in device_add_disk
block: fold register_disk into device_add_disk
block: add a sanity check for a live disk in del_gendisk
block: add an explicit ->disk backpointer to the request_queue
block: hold a request_queue reference for the lifetime of struct gendisk
block: pass a request_queue to __blk_alloc_disk
block: remove the minors argument to __alloc_disk_node
block: remove alloc_disk and alloc_disk_node
block: cleanup the lockdep handling in *alloc_disk
sg: do not allocate a gendisk
st: do not allocate a gendisk
nvme: use blk_mq_alloc_disk
...
Signed-off-by: Jens Axboe <axboe@kernel.dk>
12 files changed:
else
blk_size = queue_logical_block_size(q);
- goto err_cleanup_disk;
+ if (unlikely(blk_size < SECTOR_SIZE || blk_size > PAGE_SIZE)) {
+ dev_err(&vdev->dev,
+ "block size is changed unexpectedly, now is %u\n",
+ blk_size);
+ err = -EINVAL;
++ goto out_cleanup_disk;
+ }
+
/* Use topology information if available */
err = virtio_cread_feature(vdev, VIRTIO_BLK_F_TOPOLOGY,
struct virtio_blk_config, physical_block_exp,