linux-stable/block
Jens Axboe 8b60750464 block: ensure we hold a queue reference when using queue limits
[ Upstream commit 7b4f36cd22 ]

q_usage_counter is the only thing preventing us from the limits changing
under us in __bio_split_to_limits, but blk_mq_submit_bio doesn't hold
it while calling into it.

Move the splitting inside the region where we know we've got a queue
reference. Ideally this could still remain a shared section of code, but
let's keep the fix simple and defer any refactoring here to later.

Reported-by: Christoph Hellwig <hch@lst.de>
Fixes: 900e080752 ("block: move queue enter logic into blk_mq_submit_bio()")
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Ming Lei <ming.lei@redhat.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-01-25 15:35:57 -08:00
..
partitions
badblocks.c
bdev.c block: update the stable_writes flag in bdev_add 2023-12-03 07:33:03 +01:00
bfq-cgroup.c
bfq-iosched.c
bfq-iosched.h
bfq-wf2q.c
bio-integrity.c
bio.c block: Remove special-casing of compound pages 2024-01-25 15:35:46 -08:00
blk-cgroup-fc-appid.c
blk-cgroup-rwstat.c
blk-cgroup-rwstat.h
blk-cgroup.c blk-cgroup: bypass blkcg_deactivate_policy after destroying 2023-12-20 17:01:55 +01:00
blk-cgroup.h blk-cgroup: fix rcu lockdep warning in blkg_lookup() 2024-01-25 15:35:30 -08:00
blk-core.c block: warn once for each partition in bio_check_ro() 2024-01-20 11:51:38 +01:00
blk-crypto-fallback.c
blk-crypto-internal.h
blk-crypto-profile.c
blk-crypto-sysfs.c
blk-crypto.c
blk-flush.c
blk-ia-ranges.c
blk-integrity.c
blk-ioc.c
blk-iocost.c
blk-iolatency.c
blk-ioprio.c
blk-ioprio.h
blk-lib.c
blk-map.c
blk-merge.c
blk-mq-cpumap.c
blk-mq-debugfs-zoned.c
blk-mq-debugfs.c
blk-mq-debugfs.h
blk-mq-pci.c
blk-mq-sched.c
blk-mq-sched.h
blk-mq-sysfs.c
blk-mq-tag.c
blk-mq-virtio.c
blk-mq.c block: ensure we hold a queue reference when using queue limits 2024-01-25 15:35:57 -08:00
blk-mq.h
blk-pm.c
blk-pm.h
blk-rq-qos.c
blk-rq-qos.h
blk-settings.c
blk-stat.c
blk-stat.h
blk-sysfs.c
blk-throttle.c blk-throttle: fix lockdep warning of "cgroup_mutex or RCU read lock required!" 2023-12-20 17:01:55 +01:00
blk-throttle.h
blk-timeout.c
blk-wbt.c
blk-wbt.h
blk-zoned.c
blk.h
bounce.c
bsg-lib.c
bsg.c
disk-events.c block: fix kernel-doc for disk_force_media_change() 2023-09-26 00:43:34 -06:00
early-lookup.c
elevator.c
elevator.h
fops.c block: Don't invalidate pagecache for invalid falloc modes 2023-10-11 15:53:17 -06:00
genhd.c block: add check of 'minors' and 'first_minor' in device_add_disk() 2024-01-25 15:35:27 -08:00
holder.c
ioctl.c block: add check that partition length needs to be aligned with block size 2024-01-25 15:35:46 -08:00
ioprio.c
Kconfig
Kconfig.iosched
kyber-iosched.c
Makefile
mq-deadline.c
opal_proto.h
sed-opal.c block: Fix regression in sed-opal for a saved key. 2023-10-13 08:16:08 -06:00
t10-pi.c