linux/block
Paolo Valente 931aff6274 Revert "Revert "block, bfq: honor already-setup queue merges""
[ Upstream commit 15729ff8143f8135b03988a100a19e66d7cb7ecd ]

A crash [1] happened to be triggered in conjunction with commit
2d52c58b9c9b ("block, bfq: honor already-setup queue merges"). The
latter was then reverted by commit ebc69e897e17 ("Revert "block, bfq:
honor already-setup queue merges""). Yet, the reverted commit was not
the one introducing the bug. In fact, it actually triggered a UAF
introduced by a different commit, and now fixed by commit d29bd41428cf
("block, bfq: reset last_bfqq_created on group change").

So, there is no point in keeping commit 2d52c58b9c9b ("block, bfq:
honor already-setup queue merges") out. This commit restores it.

[1] https://bugzilla.kernel.org/show_bug.cgi?id=214503

Reported-by: Holger Hoffstätte <holger@applied-asynchrony.com>
Signed-off-by: Paolo Valente <paolo.valente@linaro.org>
Link: https://lore.kernel.org/r/20211125181510.15004-1-paolo.valente@linaro.org
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2022-04-15 14:18:23 +02:00
..
partitions docs: admin-guide: add a series of orphaned documents 2019-07-15 11:03:02 -03:00
Kconfig blkcg: implement blk-iocost 2019-08-28 21:17:12 -06:00
Kconfig.iosched docs: block: convert to ReST 2019-07-15 09:20:27 -03:00
Makefile blkcg: implement blk-iocost 2019-08-28 21:17:12 -06:00
badblocks.c block: switch all files cleared marked as GPLv2 to SPDX tags 2019-04-30 16:11:57 -06:00
bfq-cgroup.c block, bfq: don't move oom_bfqq 2022-04-15 14:18:22 +02:00
bfq-iosched.c Revert "Revert "block, bfq: honor already-setup queue merges"" 2022-04-15 14:18:23 +02:00
bfq-iosched.h bfq: fix blkio cgroup leakage v4 2020-09-03 11:26:54 +02:00
bfq-wf2q.c bfq: fix blkio cgroup leakage v4 2020-09-03 11:26:54 +02:00
bio-integrity.c block: bio-integrity: Advance seed correctly for larger interval sizes 2022-02-08 18:24:28 +01:00
bio.c block: Fix wrong offset in bio_truncate() 2022-02-01 17:24:39 +01:00
blk-cgroup.c blk-cgroup: fix UAF by grabbing blkcg lock before destroying blkg pd 2021-09-30 10:09:25 +02:00
blk-core.c Revert "Revert "block: end bio with BLK_STS_AGAIN in case of non-mq devs and REQ_NOWAIT"" 2021-02-07 15:35:47 +01:00
blk-exec.c block: add SPDX tags to block layer files missing licensing information 2019-04-30 16:12:03 -06:00
blk-flush.c block: Fix fsync always failed if once failed 2022-03-08 19:07:47 +01:00
blk-integrity.c block: centralize PI remapping logic to the block layer 2019-09-17 20:03:49 -06:00
blk-ioc.c block: Fix use-after-free issue accessing struct io_cq 2020-04-17 10:50:04 +02:00
blk-iocost.c blk-iocost: ioc_pd_free() shouldn't assume irq disabled 2020-09-09 19:12:35 +02:00
blk-iolatency.c blk-iolatency: error out if blk_get_queue() failed in iolatency_set_limit() 2021-08-12 13:20:58 +02:00
blk-lib.c block: fix 32 bit overflow in __blkdev_issue_discard() 2018-11-14 08:17:18 -07:00
blk-map.c block: fix memleak when __blk_rq_map_user_iov() is failed 2020-01-12 12:21:43 +01:00
blk-merge.c block: don't merge across cgroup boundaries if blkcg is enabled 2022-04-15 14:18:01 +02:00
blk-mq-cpumap.c blk-mq: balance mapping between present CPUs and queues 2019-08-04 21:43:12 -06:00
blk-mq-debugfs-zoned.c block: Cleanup license notice 2019-01-17 21:21:40 -07:00
blk-mq-debugfs.c blk-mq-debugfs: update blk_queue_flag_name[] accordingly for new flags 2020-07-22 09:32:52 +02:00
blk-mq-debugfs.h blk-mq: no need to check return value of debugfs_create functions 2019-06-13 03:00:30 -06:00
blk-mq-pci.c block: Fix blk_mq_*_map_queues() kernel-doc headers 2019-05-31 15:12:34 -06:00
blk-mq-rdma.c block: Fix blk_mq_*_map_queues() kernel-doc headers 2019-05-31 15:12:34 -06:00
blk-mq-sched.c kyber: fix out of bounds access when preempted 2021-05-19 10:08:30 +02:00
blk-mq-sched.h block: only call sched requeue_request() for scheduled requests 2020-09-23 12:40:37 +02:00
blk-mq-sysfs.c blk-mq: move cancel of hctx->run_work to the front of blk_exit_queue 2020-10-29 09:57:34 +01:00
blk-mq-tag.c blk-mq: introduce blk_mq_tagset_wait_completed_request() 2019-08-04 21:41:29 -06:00
blk-mq-tag.h Merge branch 'for-4.15/block' of git://git.kernel.dk/linux-block 2017-11-14 15:32:19 -08:00
blk-mq-virtio.c block: Fix blk_mq_*_map_queues() kernel-doc headers 2019-05-31 15:12:34 -06:00
blk-mq.c block: remove inaccurate requeue check 2021-11-17 09:48:31 +01:00
blk-mq.h blk-mq: insert passthrough request into hctx->dispatch directly 2020-03-21 08:11:52 +01:00
blk-pm.c scsi: block: Fix a race in the runtime power management code 2021-01-06 14:48:37 +01:00
blk-pm.h block: remove the queue_lock indirection 2018-11-15 12:17:28 -07:00
blk-rq-qos.c rq-qos: fix missed wake-ups in rq_qos_throttle try two 2021-07-19 08:53:16 +02:00
blk-rq-qos.h block: fix race between adding/removing rq qos and normal IO 2021-07-14 16:53:18 +02:00
blk-settings.c blk-settings: align max_sectors on "logical_block_size" boundary 2021-03-04 10:26:40 +01:00
blk-softirq.c block: remove a few unused exports 2018-11-15 12:13:25 -07:00
blk-stat.c block: add SPDX tags to block layer files missing licensing information 2019-04-30 16:12:03 -06:00
blk-stat.h block: deactivate blk_stat timer in wbt_disable_default() 2018-12-12 06:47:51 -07:00
blk-sysfs.c block: don't delete queue kobject before its children 2022-04-15 14:18:05 +02:00
blk-throttle.c blk-throttle: fix UAF by deleteing timer in blk_throtl_exit() 2021-09-26 14:07:13 +02:00
blk-timeout.c block: add SPDX tags to block layer files missing licensing information 2019-04-30 16:12:03 -06:00
blk-wbt.c blk-wbt: make sure throttle is enabled properly 2021-07-14 16:53:25 +02:00
blk-wbt.h blk-wbt: introduce a new disable state to prevent false positive by rwb_enabled() 2021-07-14 16:53:25 +02:00
blk-zoned.c blk-zoned: allow BLKREPORTZONE without CAP_SYS_ADMIN 2021-09-22 12:26:19 +02:00
blk.h block: fix memleak of bio integrity data 2020-01-26 10:01:09 +01:00
bounce.c block: remove the i argument to bio_for_each_segment_all 2019-04-30 09:26:13 -06:00
bsg-lib.c block: Fix the type of 'sts' in bsg_queue_rq() 2020-01-23 08:22:44 +01:00
bsg.c scsi: bsg: Remove support for SCSI_IOCTL_SEND_COMMAND 2021-09-22 12:26:23 +02:00
cmdline-parser.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
compat_ioctl.c compat_ioctl: block: handle BLKGETZONESZ/BLKGETNRZONES 2020-01-09 10:19:58 +01:00
elevator.c block/wbt: fix negative inflight counter when remove scsi device 2022-02-23 11:59:59 +01:00
genhd.c block: Suppress uevent for hidden device when removed 2021-03-30 14:35:23 +02:00
ioctl.c block: add SPDX tags to block layer files missing licensing information 2019-04-30 16:12:03 -06:00
ioprio.c block: fix ioprio_get(IOPRIO_WHO_PGRP) vs setuid(2) 2021-12-14 14:49:02 +01:00
kyber-iosched.c kyber: fix out of bounds access when preempted 2021-05-19 10:08:30 +02:00
mq-deadline.c kyber: fix out of bounds access when preempted 2021-05-19 10:08:30 +02:00
opal_proto.h block: sed-opal: Removed duplicate OPAL_METHOD_LENGTH definition 2019-08-20 09:34:49 -06:00
partition-generic.c block: fix use-after-free on gendisk 2019-04-22 09:48:12 -06:00
scsi_ioctl.c block: switch all files cleared marked as GPLv2 to SPDX tags 2019-04-30 16:11:57 -06:00
sed-opal.c block: sed-opal: fix sparse warning: convert __be64 data 2019-10-03 14:21:32 -06:00
t10-pi.c block: t10-pi: fix -Wswitch warning 2019-09-23 08:05:19 -06:00