milos-linux/drivers
Ming Lei 365ea7cc62 ublk: allow buffer registration before device is started
Before START_DEV, there is no disk, no queue, no I/O dispatch, so
the maple tree can be safely modified under ub->mutex alone without
freezing the queue.

Add ublk_lock_buf_tree()/ublk_unlock_buf_tree() helpers that take
ub->mutex first, then freeze the queue if device is started. This
ordering (mutex -> freeze) is safe because ublk_stop_dev_unlocked()
already holds ub->mutex when calling del_gendisk() which freezes
the queue.

Suggested-by: Caleb Sander Mateos <csander@purestorage.com>
Signed-off-by: Ming Lei <tom.leiming@gmail.com>
Link: https://patch.msgid.link/20260409133020.3780098-6-tom.leiming@gmail.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2026-04-09 19:10:44 -06:00
..
accel accel: ethosu: Handle possible underflow in IFM size calculations 2026-03-05 15:21:17 -06:00
accessibility
acpi Merge branch 'acpica' 2026-03-05 18:46:43 +01:00
amba
android
ata ata: libata-eh: Fix detection of deferred qc timeouts 2026-03-06 09:58:47 +01:00
atm
auxdisplay
base Revert "driver core: enforce device_lock for driver_match_device()" 2026-03-03 13:12:42 +01:00
bcma
block ublk: allow buffer registration before device is started 2026-04-09 19:10:44 -06:00
bluetooth Including fixes from IPsec, Bluetooth and netfilter 2026-02-26 08:00:13 -08:00
bus
cache
cdrom
cdx
char Bug fixes for the IPMI driver 2026-02-26 14:34:21 -08:00
clk clk: scu/imx8qxp: do not register driver in probe() 2026-02-24 12:54:17 +01:00
clocksource
comedi
connector
counter
cpufreq cpufreq: intel_pstate: Fix crash during turbo disable 2026-02-25 14:39:19 +01:00
cpuidle
crypto crypto: atmel-sha204a - Fix OOM ->tfm_count leak 2026-02-28 12:53:25 +09:00
cxl cxl/region: Test CXL_DECODER_F_NORMALIZED_ADDRESSING as a bitmask 2026-02-24 08:33:30 -07:00
dax
dca
devfreq
dibs
dio
dma
dma-buf
dpll Including fixes from IPsec, Bluetooth and netfilter 2026-02-26 08:00:13 -08:00
edac
eisa
extcon
firewire firewire: ohci: initialize page array to use alloc_pages_bulk() correctly 2026-02-28 10:09:24 -08:00
firmware x86/efi: defer freeing of boot services memory 2026-02-25 12:02:48 +01:00
fpga
fsi
fwctl
gnss
gpib
gpio gpiolib: normalize the return value of gc->get() on behalf of buggy drivers 2026-02-23 11:49:23 +01:00
gpu Cross-subsystem Changes: 2026-03-06 19:45:19 +10:00
greybus
hid hid-for-linus-2026030601 2026-03-06 10:00:58 -08:00
hsi
hte
hv
hwmon hwmon: (pmbus/q54sj108a2) fix stack overflow in debugfs read 2026-03-04 16:48:06 -08:00
hwspinlock
hwtracing
i2c i2c: i801: Revert "i2c: i801: replace acpi_lock with I2C bus lock" 2026-03-04 12:44:14 +01:00
i3c
idle
iio
infiniband RDMA/uverbs: Import DMA-BUF module in uverbs_std_types_dmabuf file 2026-02-26 04:58:24 -05:00
input
interconnect
iommu
ipack
irqchip Arm: 2026-03-01 15:34:47 -08:00
isdn
leds
macintosh
mailbox
mcb
md md/raid5: fix soft lockup in retry_aligned_read() 2026-04-07 15:13:52 +08:00
media [GIT PULL for v7.0-rc3] media fixes 2026-03-04 08:12:06 -08:00
memory
memstick
message
mfd
misc
mmc mmc: sdhci-brcmstb: use correct register offset for V1 pin_sel restore 2026-02-23 12:05:20 +01:00
most
mtd
mux
net xen: branch for v7.0-rc3 2026-03-07 07:44:32 -08:00
nfc Including fixes from IPsec, Bluetooth and netfilter 2026-02-26 08:00:13 -08:00
ntb
nubus
nvdimm block: factor out a bio_integrity_action helper 2026-03-09 07:47:02 -06:00
nvme nvme-loop: do not cancel I/O and admin tagset during ctrl reset/shutdown 2026-03-27 07:35:06 -07:00
nvmem
of
opp
parisc
parport
pci xen: branch for v7.0-rc3 2026-03-07 07:44:32 -08:00
pcmcia
peci
perf
phy
pinctrl pinctrl: cy8c95x0: Don't miss reading the last bank registers 2026-02-26 23:41:04 +01:00
platform platform/x86: dell-wmi-sysman: Don't hex dump plaintext password data 2026-03-03 14:45:17 +02:00
pmdomain pmdomain providers: 2026-03-06 09:16:39 -08:00
pnp
power
powercap
pps
ps3
ptp
pwm
rapidio
ras
regulator regulator: pf9453: Respect IRQ trigger settings from firmware 2026-03-02 14:46:28 +00:00
remoteproc
resctrl
reset
rpmsg
rtc
s390
sbus
scsi scsi: bsg: add io_uring passthrough handler 2026-03-19 11:38:24 -06:00
sh
siox
slimbus
soc
soundwire
spi spi: spi-dw-dma: fix print error log when wait finish transaction 2026-03-02 22:33:32 +00:00
spmi
ssb
staging
target block: remove bdev_nonrot() 2026-03-09 14:30:00 -06:00
tc
tee
thermal
thunderbolt
tty
ufs scsi: ufs: core: Fix shift out of bounds when MAXQ=32 2026-02-24 14:23:07 -05:00
uio
usb
vdpa
vfio
vhost
video fbdev: au1100fb: Fix build on MIPS64 2026-03-05 17:35:12 +01:00
virt
virtio
w1
watchdog
xen xen: branch for v7.0-rc3 2026-03-07 07:44:32 -08:00
zorro
Kconfig
Makefile