From: Greg Kroah-Hartman Date: Tue, 6 May 2025 12:44:16 +0000 (+0200) Subject: 6.12-stable patches X-Git-Tag: v5.15.182~49 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=3cd392eb0987c355422bce5f3b703126ead4a7a5;p=thirdparty%2Fkernel%2Fstable-queue.git 6.12-stable patches added patches: blk-mq-create-correct-map-for-fallback-case.patch --- diff --git a/queue-6.12/blk-mq-create-correct-map-for-fallback-case.patch b/queue-6.12/blk-mq-create-correct-map-for-fallback-case.patch new file mode 100644 index 0000000000..262a8576e0 --- /dev/null +++ b/queue-6.12/blk-mq-create-correct-map-for-fallback-case.patch @@ -0,0 +1,53 @@ +From a9ae6fe1c319c4776c2b11e85e15109cd3f04076 Mon Sep 17 00:00:00 2001 +From: Daniel Wagner +Date: Thu, 23 Jan 2025 14:08:29 +0100 +Subject: blk-mq: create correct map for fallback case + +From: Daniel Wagner + +commit a9ae6fe1c319c4776c2b11e85e15109cd3f04076 upstream. + +The fallback code in blk_mq_map_hw_queues is original from +blk_mq_pci_map_queues and was added to handle the case where +pci_irq_get_affinity will return NULL for !SMP configuration. + +blk_mq_map_hw_queues replaces besides blk_mq_pci_map_queues also +blk_mq_virtio_map_queues which used to use blk_mq_map_queues for the +fallback. + +It's possible to use blk_mq_map_queues for both cases though. +blk_mq_map_queues creates the same map as blk_mq_clear_mq_map for !SMP +that is CPU 0 will be mapped to hctx 0. + +The WARN_ON_ONCE has to be dropped for virtio as the fallback is also +taken for certain configuration on default. Though there is still a +WARN_ON_ONCE check in lib/group_cpus.c: + + WARN_ON(nr_present + nr_others < numgrps); + +which will trigger if the caller tries to create more hardware queues +than CPUs. It tests the same as the WARN_ON_ONCE in +blk_mq_pci_map_queues did. + +Fixes: a5665c3d150c ("virtio: blk/scsi: replace blk_mq_virtio_map_queues with blk_mq_map_hw_queues") +Reported-by: Steven Rostedt +Closes: https://lore.kernel.org/all/20250122093020.6e8a4e5b@gandalf.local.home/ +Signed-off-by: Daniel Wagner +Link: https://lore.kernel.org/r/20250123-fix-blk_mq_map_hw_queues-v1-1-08dbd01f2c39@kernel.org +Signed-off-by: Jens Axboe +Signed-off-by: Greg Kroah-Hartman +--- + block/blk-mq-cpumap.c | 3 +-- + 1 file changed, 1 insertion(+), 2 deletions(-) + +--- a/block/blk-mq-cpumap.c ++++ b/block/blk-mq-cpumap.c +@@ -87,7 +87,6 @@ void blk_mq_map_hw_queues(struct blk_mq_ + return; + + fallback: +- WARN_ON_ONCE(qmap->nr_queues > 1); +- blk_mq_clear_mq_map(qmap); ++ blk_mq_map_queues(qmap); + } + EXPORT_SYMBOL_GPL(blk_mq_map_hw_queues); diff --git a/queue-6.12/series b/queue-6.12/series index 76fec37831..3341bd4928 100644 --- a/queue-6.12/series +++ b/queue-6.12/series @@ -133,3 +133,4 @@ net-vertexcom-mse102x-fix-possible-stuck-of-spi-inte.patch net-vertexcom-mse102x-fix-len_mask.patch net-vertexcom-mse102x-add-range-check-for-cmd_rts.patch net-vertexcom-mse102x-fix-rx-error-handling.patch +blk-mq-create-correct-map-for-fallback-case.patch