kernel-hacking-2024-linux-s.../block
Shin'ichiro Kawasaki 0a5aa8d161 block: fix blk_mq_attempt_bio_merge and rq_qos_throttle protection
Commit 9d497e2941 ("block: don't protect submit_bio_checks by
q_usage_counter") moved blk_mq_attempt_bio_merge and rq_qos_throttle
calls out of q_usage_counter protection. However, these functions require
q_usage_counter protection. The blk_mq_attempt_bio_merge call without
the protection resulted in blktests block/005 failure with KASAN null-
ptr-deref or use-after-free at bio merge. The rq_qos_throttle call
without the protection caused kernel hang at qos throttle.

To fix the failures, move the blk_mq_attempt_bio_merge and
rq_qos_throttle calls back to q_usage_counter protection.

Fixes: 9d497e2941 ("block: don't protect submit_bio_checks by q_usage_counter")
Signed-off-by: Shin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com>
Link: https://lore.kernel.org/r/20220308080915.3473689-1-shinichiro.kawasaki@wdc.com
Reviewed-by: Ming Lei <ming.lei@redhat.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2022-03-08 17:48:39 -07:00
..
partitions
badblocks.c
bdev.c mm: remove cleancache 2022-01-22 08:33:38 +02:00
bfq-cgroup.c
bfq-iosched.c block/wbt: fix negative inflight counter when remove scsi device 2022-02-17 07:54:03 -07:00
bfq-iosched.h bfq: Provide helper to generate bfqq name 2021-11-29 06:38:52 -07:00
bfq-wf2q.c
bio-integrity.c block: bio-integrity: Advance seed correctly for larger interval sizes 2022-02-03 21:09:24 -07:00
bio.c block: Fix wrong offset in bio_truncate() 2022-01-20 06:30:12 -07:00
blk-cgroup-rwstat.c
blk-cgroup-rwstat.h
blk-cgroup.c block: don't include <linux/part_stat.h> in blk.h 2021-11-29 06:38:44 -07:00
blk-core.c block: fix surprise removal for drivers calling blk_set_queue_dying 2022-02-17 07:54:03 -07:00
blk-crypto-fallback.c
blk-crypto-internal.h
blk-crypto-profile.c blk-crypto: remove blk_crypto_unregister() 2021-11-29 06:38:51 -07:00
blk-crypto.c
blk-flush.c block: switch to atomic_t for request references 2021-12-03 14:51:29 -07:00
blk-ia-ranges.c block: fix memory leak in disk_register_independent_access_ranges 2022-01-23 09:13:09 -07:00
blk-integrity.c blk-crypto: remove blk_crypto_unregister() 2021-11-29 06:38:51 -07:00
blk-ioc.c block: drop needless assignment in set_task_ioprio() 2021-12-23 07:10:07 -07:00
blk-iocost.c iocost: Fix divide-by-zero on donation from low hweight cgroup 2021-12-14 06:58:15 -07:00
blk-iolatency.c
blk-ioprio.c
blk-ioprio.h
blk-lib.c
blk-map.c block-map: add __GFP_ZERO flag for alloc_page in function bio_copy_kern 2022-02-17 07:54:03 -07:00
blk-merge.c block: don't check ->rq_disk in merges 2021-11-29 06:41:29 -07:00
blk-mq-cpumap.c
blk-mq-debugfs-zoned.c
blk-mq-debugfs.c blk-mq: check q->poll_stat in queue_poll_stat_show 2021-12-02 08:20:49 -07:00
blk-mq-debugfs.h
blk-mq-pci.c
blk-mq-rdma.c
blk-mq-sched.c blk-mq: run dispatch lock once in case of issuing from list 2021-12-03 14:51:29 -07:00
blk-mq-sched.h block: move blk_mq_sched_assign_ioc to blk-ioc.c 2021-11-29 06:41:29 -07:00
blk-mq-sysfs.c blk-mq: move srcu from blk_mq_hw_ctx to request_queue 2021-12-03 14:51:29 -07:00
blk-mq-tag.c blk-mq: fix tag_get wait task can't be awakened 2022-01-13 12:52:14 -07:00
blk-mq-tag.h blk-mq: Delete busy_iter_fn 2021-12-06 13:18:47 -07:00
blk-mq-virtio.c
blk-mq.c block: fix blk_mq_attempt_bio_merge and rq_qos_throttle protection 2022-03-08 17:48:39 -07:00
blk-mq.h blk-mq: don't run might_sleep() if the operation needn't blocking 2021-12-06 09:40:42 -07:00
blk-pm.c scsi: block: pm: Always set request queue runtime active in blk_post_runtime_resume() 2021-12-22 23:38:29 -05:00
blk-pm.h
blk-rq-qos.c
blk-rq-qos.h
blk-settings.c
blk-stat.c block: make queue stat accounting a reference 2021-12-14 17:23:05 -07:00
blk-stat.h block: make queue stat accounting a reference 2021-12-14 17:23:05 -07:00
blk-sysfs.c block: cleanup q->srcu 2022-01-17 07:24:45 -07:00
blk-throttle.c block: don't include blk-mq.h in blk.h 2021-11-29 06:38:44 -07:00
blk-throttle.h
blk-timeout.c
blk-wbt.c
blk-wbt.h
blk-zoned.c
blk.h block: only build the icq tracking code when needed 2021-12-16 10:59:02 -07:00
bounce.c
bsg-lib.c block: remove the gendisk argument to blk_execute_rq 2021-11-29 06:41:29 -07:00
bsg.c
disk-events.c
elevator.c block/wbt: fix negative inflight counter when remove scsi device 2022-02-17 07:54:03 -07:00
elevator.h
fops.c block: clear iocb->private in blkdev_bio_end_io_async() 2022-02-22 06:59:49 -07:00
genhd.c block: fix surprise removal for drivers calling blk_set_queue_dying 2022-02-17 07:54:03 -07:00
holder.c
ioctl.c
ioprio.c for-5.17/block-2022-01-11 2022-01-12 10:26:52 -08:00
Kconfig block: only build the icq tracking code when needed 2021-12-16 10:59:02 -07:00
Kconfig.iosched block: only build the icq tracking code when needed 2021-12-16 10:59:02 -07:00
kyber-iosched.c block: make queue stat accounting a reference 2021-12-14 17:23:05 -07:00
Makefile
mq-deadline.c block: fix async_depth sysfs interface for mq-deadline 2022-01-20 10:54:02 -07:00
opal_proto.h
sed-opal.c
t10-pi.c