linux/drivers/block
Ming Lei 231a49460a block: ublk: make sure that block size is set correctly
[ Upstream commit 1d1665279a ]

block size is one very key setting for block layer, and bad block size
could panic kernel easily.

Make sure that block size is set correctly.

Meantime if ublk_validate_params() fails, clear ub->params so that disk
is prevented from being added.

Fixes: 71f28f3136 ("ublk_drv: add io_uring based userspace block driver")
Reported-and-tested-by: Breno Leitao <leitao@debian.org>
Signed-off-by: Ming Lei <ming.lei@redhat.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-04-13 16:55:32 +02:00
..
aoe
drbd use less confusing names for iov_iter direction initializers 2023-02-09 11:28:04 +01:00
mtip32xx
null_blk block: null_blk: Fix handling of fake timeout request 2023-03-22 13:33:47 +01:00
paride
rnbd block/rnbd-clt: fix wrong max ID in ida_alloc_max 2023-02-01 08:34:21 +01:00
xen-blkback
zram - Alistair Popple has a series which addresses a race which causes page 2022-10-14 12:28:43 -07:00
amiflop.c
ataflop.c
brd.c brd: use radix_tree_maybe_preload instead of radix_tree_preload 2023-03-10 09:34:34 +01:00
floppy.c floppy: Fix memory leak in do_floppy_init() 2022-12-31 13:33:11 +01:00
Kconfig ublk_drv: comment on ublk_driver entry of Kconfig 2022-10-31 07:23:24 -06:00
loop.c loop: LOOP_CONFIGURE: send uevents for partitions 2023-04-06 12:10:47 +02:00
Makefile
n64cart.c
nbd.c use less confusing names for iov_iter direction initializers 2023-02-09 11:28:04 +01:00
pktcdvd.c pktcdvd: check for NULL returna fter calling bio_split_to_limits() 2023-01-24 07:24:37 +01:00
ps3disk.c
ps3vram.c block: handle bio_split_to_limits() NULL return 2023-01-18 11:58:33 +01:00
rbd_types.h
rbd.c rbd: avoid use-after-free in do_rbd_add() when rbd_dev_create() fails 2023-03-10 09:34:25 +01:00
sunvdc.c block: sunvdc: add check for mdesc_grab() returning NULL 2023-03-22 13:33:47 +01:00
swim_asm.S
swim.c
swim3.c
ublk_drv.c block: ublk: make sure that block size is set correctly 2023-04-13 16:55:32 +02:00
virtio_blk.c virtio_blk: Fix signedness bug in virtblk_prep_rq() 2023-01-12 12:02:54 +01:00
xen-blkfront.c
z2ram.c