linux/drivers
Ming Lei cebbe577cb 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: 71f28f3136 ("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>
2022-07-14 07:16:04 -06:00
..
accessibility
acpi More power management updates for 5.19-rc1 2022-05-30 11:37:26 -07:00
amba Driver core changes for 5.19-rc1 2022-06-03 11:48:47 -07:00
android fix for breakage in #work.fd this window 2022-06-05 17:14:03 -07:00
ata ata: libata-transport: fix {dma|pio|xfer}_mode sysfs files 2022-06-09 09:25:25 +09:00
atm
auxdisplay
base Minor things, mainly - mailmap updates, MAINTAINERS updates, etc. 2022-06-26 14:00:55 -07:00
bcma
block ublk_drv: fix request queue leak 2022-07-14 07:16:04 -06:00
bluetooth
bus ARM: SoC fixes for 5.19 2022-06-26 14:12:56 -07:00
cdrom block: remove blk_cleanup_disk 2022-06-28 06:33:15 -06:00
char random: update comment from copy_to_user() -> copy_to_iter() 2022-06-20 11:06:17 +02:00
clk Driver core changes for 5.19-rc1 2022-06-03 11:48:47 -07:00
clocksource clocksource: hyper-v: unexport __init-annotated hv_init_clocksource() 2022-06-08 12:27:08 +00:00
comedi comedi: vmk80xx: fix expression for tx buffer size 2022-06-10 15:21:23 +02:00
connector
counter
cpufreq ARM: multiplatform changes, part 2 2022-06-02 15:23:54 -07:00
cpuidle
crypto virtio-crypto: enable retry for virtio-crypto-dev 2022-05-31 12:45:09 -04:00
cxl
dax
dca
devfreq
dio
dma dmaengine updates for v5.19-rc1 2022-05-29 11:38:27 -07:00
dma-buf udmabuf: add back sanity check 2022-06-20 08:38:29 -05:00
edac
eisa
extcon
firewire firewire: convert sysfs sprintf/snprintf family to sysfs_emit 2022-06-17 10:43:20 +02:00
firmware ARM: SoC fixes for 5.19 2022-06-26 14:12:56 -07:00
fpga
fsi
gnss
gpio gpio fixes for v5.19-rc4 2022-06-24 17:01:31 -07:00
gpu xen: branch for v5.19-rc4 2022-06-24 12:22:11 -07:00
greybus
hid HID: hyperv: Correctly access fields declared as __le16 2022-06-08 12:28:13 +00:00
hsi
hte
hv Drivers: hv: vmbus: Release cpu lock in error case 2022-06-10 08:41:28 +00:00
hwmon hwmon: (asus-ec-sensors) add missing comma in board name list. 2022-06-15 08:14:38 -07:00
hwspinlock
hwtracing
i2c i2c: mediatek: Fix an error handling path in mtk_i2c_probe() 2022-06-14 22:11:54 +02:00
i3c
idle cpuidle,intel_idle: Fix CPUIDLE_FLAG_IRQ_ENABLE 2022-06-08 18:05:45 +02:00
iio 1st set of IIO fixes for the 5.19 cycle. 2022-06-20 09:49:52 +02:00
infiniband blk-mq: Drop 'reserved' arg of busy_tag_iter_fn 2022-07-06 06:33:53 -06:00
input Input updates for v5.19-rc1 2022-06-07 15:00:29 -07:00
interconnect Char / Misc / Other smaller driver subsystem updates for 5.19-rc1 2022-06-03 11:36:34 -07:00
iommu iommu/ipmmu-vmsa: Fix compatible for rcar-gen4 2022-06-22 15:45:56 +02:00
ipack
irqchip irqchip/loongson-liointc: Use architecture register to get coreid 2022-06-10 08:57:19 +01:00
isdn
leds ARM: multiplatform changes, part 2 2022-06-02 15:23:54 -07:00
macintosh
mailbox
mcb
md block: move zone related fields to struct gendisk 2022-07-06 06:46:26 -06:00
media USB / Thunderbolt changes for 5.19-rc1 2022-06-03 11:17:49 -07:00
memory memory: samsung: exynos5422-dmc: Fix refcount leak in of_get_dram_timings 2022-06-06 11:18:20 +02:00
memstick block: remove blk_cleanup_disk 2022-06-28 06:33:15 -06:00
message
mfd ARM: multiplatform changes, part 2 2022-06-02 15:23:54 -07:00
misc Char/Misc driver fixes for 5.19-rc3 - take 2 2022-06-19 09:37:29 -05:00
mmc blk-mq: Drop blk_mq_ops.timeout 'reserved' arg 2022-07-06 06:33:53 -06:00
most
mtd block: remove blk_cleanup_disk 2022-06-28 06:33:15 -06:00
mux
net virtio_net: fix xdp_rxq_info bug after suspend/resume 2022-06-22 19:09:13 -07:00
nfc nfc: nfcmrvl: Fix memory leak in nfcmrvl_play_deferred 2022-06-08 10:18:10 -07:00
ntb
nubus
nvdimm block: remove blk_cleanup_disk 2022-06-28 06:33:15 -06:00
nvme block: move zone related fields to struct gendisk 2022-07-06 06:46:26 -06:00
nvmem
of
opp
parisc
parport
pci Driver core changes for 5.19-rc1 2022-06-03 11:48:47 -07:00
pcmcia ARM: multiplatform changes, part 2 2022-06-02 15:23:54 -07:00
peci
perf
phy
pinctrl Pin control bulk changes for the v5.19 series: 2022-05-28 11:15:54 -07:00
platform platform-drivers-x86 for v5.19-2 2022-06-12 11:33:42 -07:00
pnp
power Char / Misc / Other smaller driver subsystem updates for 5.19-rc1 2022-06-03 11:36:34 -07:00
powercap
pps
ps3
ptp
pwm
rapidio
ras
regulator regulator: qcom_smd: correct MP5496 ranges 2022-06-07 20:38:09 +01:00
remoteproc
reset
rpmsg Driver core changes for 5.19-rc1 2022-06-03 11:48:47 -07:00
rtc ARM: multiplatform changes, part 2 2022-06-02 15:23:54 -07:00
s390 blk-mq: Drop blk_mq_ops.timeout 'reserved' arg 2022-07-06 06:33:53 -06:00
sbus
scsi block: move zone related fields to struct gendisk 2022-07-06 06:46:26 -06:00
sh
siox
slimbus Driver core changes for 5.19-rc1 2022-06-03 11:48:47 -07:00
soc This pull request contains Broadcom ARM-based SoCs driver fixes for 2022-06-14 12:20:31 +02:00
soundwire
spi spi: rockchip: Unmask IRQ at the final to avoid preemption 2022-06-20 11:35:43 +01:00
spmi
ssb
staging staging: rtl8723bs: Allocate full pwep structure 2022-06-10 09:10:16 +02:00
target blk-mq: remove the done argument to blk_execute_rq_nowait 2022-05-28 06:15:27 -06:00
tc
tee Fix a compiler warning in OP-TEE driver 2022-05-30 14:44:27 +02:00
thermal Additional thermal control update for 5.19-rc1 2022-05-30 11:34:13 -07:00
thunderbolt USB / Thunderbolt changes for 5.19-rc1 2022-06-03 11:17:49 -07:00
tty Merge branch 'rework/kthreads' into for-linus 2022-06-23 19:11:28 +02:00
ufs block: simplify disk shutdown 2022-06-28 06:30:26 -06:00
uio
usb usb: chipidea: udc: check request status before setting device address 2022-06-24 13:45:23 +02:00
vdpa vduse: Fix NULL pointer dereference on sysfs access 2022-06-08 08:56:03 -04:00
vfio VFIO updates for v5.19-rc1 2022-06-01 13:49:15 -07:00
vhost vdpa: make get_vq_group and set_group_asid optional 2022-06-09 00:26:35 -04:00
video fbdev fixes and updates for kernel v5.19-rc4: 2022-06-26 09:13:51 -07:00
virt Char / Misc / Other smaller driver subsystem updates for 5.19-rc1 2022-06-03 11:36:34 -07:00
virtio virtio,vdpa: fixes 2022-06-11 16:32:47 -07:00
vlynq
vme
w1
watchdog watchdog: gxp: Add missing MODULE_LICENSE 2022-06-09 12:20:34 +02:00
xen xen/gntdev: Avoid blocking in unmap_grant_pages() 2022-06-23 15:29:18 +02:00
zorro
Kconfig SCSI misc on 20220604 2022-06-05 09:25:12 -07:00
Makefile SCSI misc on 20220604 2022-06-05 09:25:12 -07:00