ublk_drv: don't probe partitions if the ubq daemon isn't trusted
authorMing Lei <ming.lei@redhat.com>
Fri, 6 Jan 2023 04:17:07 +0000 (12:17 +0800)
committerJens Axboe <axboe@kernel.dk>
Sun, 29 Jan 2023 22:18:34 +0000 (15:18 -0700)
commit73a166d9749230d598320fdae3b687cdc0e2e205
treebd2e10fc273a8dda12f104f830c94c7857a6d8c2
parented878d1c1c641c4a6bd366658fc8e6bc842b80d1
ublk_drv: don't probe partitions if the ubq daemon isn't trusted

If any ubq daemon is unprivileged, the ublk char device is allowed
for unprivileged user actually, and we can't trust the current user,
so not probe partitions.

Fixes: 71f28f3136af ("ublk_drv: add io_uring based userspace block driver")
Reviewed-by: ZiyangZhang <ZiyangZhang@linux.alibaba.com>
Signed-off-by: Ming Lei <ming.lei@redhat.com>
Link: https://lore.kernel.org/r/20230106041711.914434-3-ming.lei@redhat.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/block/ublk_drv.c