Mike Christie 56974c07f2 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: Mike Christie <michael.christie@oracle.com>
Reviewed-by: Ming Lei <ming.lei@redhat.com>
Link: https://lore.kernel.org/r/20231012150600.6198-2-michael.christie@oracle.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2023-10-17 08:27:24 -06:00
..
2023-10-03 18:23:48 -06:00
2023-08-28 11:04:18 -07:00
2023-01-04 14:44:13 -07:00
2022-06-28 06:33:15 -06:00
2023-08-29 20:21:42 -07:00
2022-06-28 06:33:15 -06:00
2023-01-29 15:18:35 -07:00
2023-08-30 11:51:55 +02:00
2023-08-10 08:32:59 -06:00
2023-10-17 08:27:24 -06:00
2023-06-26 12:47:20 -07:00