aboutsummaryrefslogtreecommitdiffstats
path: root/block
diff options
context:
space:
mode:
authorMing Lei <ming.lei@redhat.com>2022-07-14 18:32:01 +0800
committerJens Axboe <axboe@kernel.dk>2022-07-14 07:16:04 -0600
commitcebbe577cb17ed9b04b50d9e6802a8bacffbadca (patch)
tree7ce64abd80d8b9f19a9ea8ef0d6af7955ddcf7c2 /block
parentublk_drv: support to complete io command via task_work_add (diff)
downloadlinux-dev-cebbe577cb17ed9b04b50d9e6802a8bacffbadca.tar.xz
linux-dev-cebbe577cb17ed9b04b50d9e6802a8bacffbadca.zip
ublk_drv: fix request queue leak
Call blk_cleanup_queue() in release code path for fixing request queue leak. Also for-5.20/block has cleaned up blk_cleanup_queue(), which is basically merged to del_gendisk() if blk_mq_alloc_disk() is used for allocating disk and queue. However, ublk may not add disk in case of starting device failure, then del_gendisk() won't be called when removing ublk device, so blk_mq_exit_queue will not be callsed, and it can be bit hard to deal with this kind of merge conflict. Turns out ublk's queue/disk use model is very similar with scsi, so switch to scsi's model by allocating disk and queue independently, then it can be quite easy to handle v5.20 merge conflict by replacing blk_cleanup_queue with blk_mq_destroy_queue. Reported-by: Jens Axboe <axboe@kernel.dk> Fixes: 71f28f3136af ("ublk_drv: add io_uring based userspace block driver") Signed-off-by: Ming Lei <ming.lei@redhat.com> Link: https://lore.kernel.org/r/20220714103201.131648-1-ming.lei@redhat.com Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'block')
0 files changed, 0 insertions, 0 deletions