linux-IllusionX/block
Ming Lei d28b256db5 blk-mq: setup queue ->tag_set before initializing hctx
commit c25c0c9035bb8b28c844dfddeda7b8bdbcfcae95 upstream.

Commit 7b815817aa ("blk-mq: add helper for checking if one CPU is mapped to specified hctx")
needs to check queue mapping via tag set in hctx's cpuhp handler.

However, q->tag_set may not be setup yet when the cpuhp handler is
enabled, then kernel oops is triggered.

Fix the issue by setup queue tag_set before initializing hctx.

Cc: stable@vger.kernel.org
Reported-and-tested-by: Rick Koch <mr.rickkoch@gmail.com>
Closes: https://lore.kernel.org/linux-block/CANa58eeNDozLaBHKPLxSAhEy__FPfJT_F71W=sEQw49UCrC9PQ@mail.gmail.com
Fixes: 7b815817aa ("blk-mq: add helper for checking if one CPU is mapped to specified hctx")
Signed-off-by: Ming Lei <ming.lei@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: John Garry <john.g.garry@oracle.com>
Link: https://lore.kernel.org/r/20241014005115.2699642-1-ming.lei@redhat.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-10-22 15:51:24 +02:00
..
partitions block: fix potential invalid pointer dereference in blk_add_partition 2024-10-04 16:37:33 +02:00
badblocks.c
bdev.c
bfq-cgroup.c
bfq-iosched.c block, bfq: fix procress reference leakage for bfqq in merge chain 2024-10-04 16:37:33 +02:00
bfq-iosched.h
bfq-wf2q.c
bio-integrity.c
bio.c
blk-cgroup-fc-appid.c
blk-cgroup-rwstat.c
blk-cgroup-rwstat.h
blk-cgroup.c
blk-cgroup.h
blk-core.c scsi: block: Don't check REQ_ATOMIC for reads 2024-10-04 16:37:44 +02: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_iocost: fix more out of bound shifts 2024-10-10 12:03:10 +02:00
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.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 blk-mq: setup queue ->tag_set before initializing hctx 2024-10-22 15:51:24 +02:00
blk-mq.h
blk-pm.c
blk-pm.h
blk-rq-qos.c blk-rq-qos: fix crash on rq_qos_wait vs. rq_qos_wake_function race 2024-10-22 15:51:24 +02:00
blk-rq-qos.h
blk-settings.c
blk-stat.c
blk-stat.h
blk-sysfs.c
blk-throttle.c
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
early-lookup.c
elevator.c block: Fix elv_iosched_local_module handling of "none" scheduler 2024-10-04 16:38:57 +02:00
elevator.h
fops.c
genhd.c
holder.c
ioctl.c block: fix integer overflow in BLKSECDISCARD 2024-10-10 12:03:16 +02:00
ioprio.c
Kconfig
Kconfig.iosched
kyber-iosched.c
Makefile
mq-deadline.c
opal_proto.h
sed-opal.c
t10-pi.c