Ming Lei 1d1665279a block: ublk: make sure that block size is set correctly
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: 71f28f3136af ("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>
2023-04-06 08:12:08 -06:00
..
2022-06-28 06:33:15 -06:00
2022-06-28 06:33:15 -06:00
2023-02-22 13:35:51 -08:00
2023-01-04 14:44:13 -07:00
2022-06-28 06:33:15 -06:00
2022-06-28 06:33:15 -06:00
2023-01-29 15:18:35 -07:00
2022-06-28 06:33:15 -06:00
2022-06-28 06:33:15 -06:00
2023-01-12 17:02:20 -06:00
2022-06-28 06:33:15 -06:00