summaryrefslogtreecommitdiffstats
path: root/lib/linear_ranges.c
diff options
context:
space:
mode:
authorMike Christie <michael.christie@oracle.com>2023-10-12 10:05:59 -0500
committerJens Axboe <axboe@kernel.dk>2023-10-17 08:27:24 -0600
commit56974c07f2c77d302fc311b0c6b95f45be76a3ae (patch)
tree666bc36eacf54488d18e783e17bba23fdac0e312 /lib/linear_ranges.c
parentd451fdd0fe8323bf970b735cf276d4e11ae8cdcc (diff)
downloadlinux-stable-56974c07f2c77d302fc311b0c6b95f45be76a3ae.tar.gz
linux-stable-56974c07f2c77d302fc311b0c6b95f45be76a3ae.tar.bz2
linux-stable-56974c07f2c77d302fc311b0c6b95f45be76a3ae.zip
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>
Diffstat (limited to 'lib/linear_ranges.c')
0 files changed, 0 insertions, 0 deletions