Skip to content
Commit 231a4946 authored by Ming Lei's avatar Ming Lei Committed by Greg Kroah-Hartman
Browse files

block: ublk: make sure that block size is set correctly



[ Upstream commit 1d166527 ]

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: 71f28f31 ("ublk_drv: add io_uring based userspace block driver")
Reported-and-tested-by: default avatarBreno Leitao <leitao@debian.org>
Signed-off-by: default avatarMing Lei <ming.lei@redhat.com>
Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent fb9ec305
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment