ublk: santizize the arguments from userspace when adding a device block-6.16-20250619
authorRonnie Sahlberg <rsahlberg@whamcloud.com>
Thu, 19 Jun 2025 02:10:31 +0000 (12:10 +1000)
committerJens Axboe <axboe@kernel.dk>
Thu, 19 Jun 2025 13:53:24 +0000 (07:53 -0600)
commit8c8472855884355caf3d8e0c50adf825f83454b2
tree7e5a5c4774bdccef75551639d8006416b54b07a3
parentcffc873d68ab09a0432b8212008c5613f8a70a2c
ublk: santizize the arguments from userspace when adding a device

Sanity check the values for queue depth and number of queues
we get from userspace when adding a device.

Signed-off-by: Ronnie Sahlberg <rsahlberg@whamcloud.com>
Reviewed-by: Ming Lei <ming.lei@redhat.com>
Fixes: 71f28f3136af ("ublk_drv: add io_uring based userspace block driver")
Fixes: 62fe99cef94a ("ublk: add read()/write() support for ublk char device")
Link: https://lore.kernel.org/r/20250619021031.181340-1-ronniesahlberg@gmail.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/block/ublk_drv.c