]> git.ipfire.org Git - thirdparty/linux.git/commit
ublk_drv: add module parameter of ublks_max for limiting max allowed ublk dev
authorMing Lei <ming.lei@redhat.com>
Fri, 6 Jan 2023 04:17:10 +0000 (12:17 +0800)
committerJens Axboe <axboe@kernel.dk>
Sun, 29 Jan 2023 22:18:34 +0000 (15:18 -0700)
commit403ebc877832752da9fc851284fa00ceca7b2fae
tree43b0d642c59f1b0f695d027812c181fe3b26109e
parentabb864d380854b5427b6b070beb2ebc291ce4d1e
ublk_drv: add module parameter of ublks_max for limiting max allowed ublk dev

Prepare for supporting unprivileged ublk device by limiting max number
ublk devices added. Otherwise too many ublk devices could be added by
un-trusted user, which can be thought as one DoS.

Reviewed-by: ZiyangZhang <ZiyangZhang@linux.alibaba.com>
Signed-off-by: Ming Lei <ming.lei@redhat.com>
Link: https://lore.kernel.org/r/20230106041711.914434-6-ming.lei@redhat.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/block/ublk_drv.c