Skip to content
Commit 56974c07 authored by Mike Christie's avatar Mike Christie Committed by Jens Axboe
Browse files

ublk: Limit dev_id/ub_number values



The dev_id/ub_number is used for the ublk dev's char device's minor
number so it has to fit into MINORMASK. This patch adds checks to prevent
userspace from passing a number that's too large and limits what can be
allocated by the ublk_index_idr for the case where userspace has the
kernel allocate the dev_id/ub_number.

Signed-off-by: default avatarMike Christie <michael.christie@oracle.com>
Reviewed-by: default avatarMing Lei <ming.lei@redhat.com>
Link: https://lore.kernel.org/r/20231012150600.6198-2-michael.christie@oracle.com


Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent d451fdd0
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