From: Greg Kroah-Hartman Date: Fri, 9 Jan 2026 10:42:42 +0000 (+0100) Subject: 6.1-stable patches X-Git-Tag: v6.1.160~18 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=518426f679eb37ded7ed493dfc0d08e6cc123577;p=thirdparty%2Fkernel%2Fstable-queue.git 6.1-stable patches added patches: blk-mq-setup-queue-tag_set-before-initializing-hctx.patch tty-fix-tty_port_tty_-hangup-kernel-doc.patch --- diff --git a/queue-6.1/blk-mq-setup-queue-tag_set-before-initializing-hctx.patch b/queue-6.1/blk-mq-setup-queue-tag_set-before-initializing-hctx.patch new file mode 100644 index 0000000000..33955f5971 --- /dev/null +++ b/queue-6.1/blk-mq-setup-queue-tag_set-before-initializing-hctx.patch @@ -0,0 +1,55 @@ +From c25c0c9035bb8b28c844dfddeda7b8bdbcfcae95 Mon Sep 17 00:00:00 2001 +From: Ming Lei +Date: Mon, 14 Oct 2024 08:51:15 +0800 +Subject: blk-mq: setup queue ->tag_set before initializing hctx + +From: Ming Lei + +commit c25c0c9035bb8b28c844dfddeda7b8bdbcfcae95 upstream. + +Commit 7b815817aa58 ("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 +Closes: https://lore.kernel.org/linux-block/CANa58eeNDozLaBHKPLxSAhEy__FPfJT_F71W=sEQw49UCrC9PQ@mail.gmail.com +Fixes: 7b815817aa58 ("blk-mq: add helper for checking if one CPU is mapped to specified hctx") +Signed-off-by: Ming Lei +Reviewed-by: Christoph Hellwig +Reviewed-by: John Garry +Link: https://lore.kernel.org/r/20241014005115.2699642-1-ming.lei@redhat.com +Signed-off-by: Jens Axboe +Signed-off-by: Greg Kroah-Hartman +--- + block/blk-mq.c | 8 ++++++-- + 1 file changed, 6 insertions(+), 2 deletions(-) + +--- a/block/blk-mq.c ++++ b/block/blk-mq.c +@@ -4337,6 +4337,12 @@ int blk_mq_init_allocated_queue(struct b + if (!q->poll_cb) + goto err_exit; + ++ /* ++ * ->tag_set has to be setup before initialize hctx, which cpuphp ++ * handler needs it for checking queue mapping ++ */ ++ q->tag_set = set; ++ + if (blk_mq_alloc_ctxs(q)) + goto err_poll; + +@@ -4355,8 +4361,6 @@ int blk_mq_init_allocated_queue(struct b + INIT_WORK(&q->timeout_work, blk_mq_timeout_work); + blk_queue_rq_timeout(q, set->timeout ? set->timeout : 30 * HZ); + +- q->tag_set = set; +- + q->queue_flags |= QUEUE_FLAG_MQ_DEFAULT; + blk_mq_update_poll_flag(q); + diff --git a/queue-6.1/series b/queue-6.1/series index 604507bc52..fe8be6689a 100644 --- a/queue-6.1/series +++ b/queue-6.1/series @@ -619,3 +619,5 @@ ext4-filesystems-without-casefold-feature-cannot-be-mounted-with-siphash.patch ext4-factor-out-ext4_hash_info_init.patch ext4-fix-error-message-when-rejecting-the-default-hash.patch pwm-stm32-always-program-polarity.patch +blk-mq-setup-queue-tag_set-before-initializing-hctx.patch +tty-fix-tty_port_tty_-hangup-kernel-doc.patch diff --git a/queue-6.1/tty-fix-tty_port_tty_-hangup-kernel-doc.patch b/queue-6.1/tty-fix-tty_port_tty_-hangup-kernel-doc.patch new file mode 100644 index 0000000000..1ae9827e99 --- /dev/null +++ b/queue-6.1/tty-fix-tty_port_tty_-hangup-kernel-doc.patch @@ -0,0 +1,81 @@ +From 6241b49540a65a6d5274fa938fd3eb4cbfe2e076 Mon Sep 17 00:00:00 2001 +From: "Jiri Slaby (SUSE)" +Date: Tue, 24 Jun 2025 10:06:41 +0200 +Subject: tty: fix tty_port_tty_*hangup() kernel-doc +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +From: Jiri Slaby (SUSE) + +commit 6241b49540a65a6d5274fa938fd3eb4cbfe2e076 upstream. + +The commit below added a new helper, but omitted to move (and add) the +corressponding kernel-doc. Do it now. + +Signed-off-by: "Jiri Slaby (SUSE)" +Fixes: 2b5eac0f8c6e ("tty: introduce and use tty_port_tty_vhangup() helper") +Link: https://lore.kernel.org/all/b23d566c-09dc-7374-cc87-0ad4660e8b2e@linux.intel.com/ +Reported-by: Ilpo Järvinen +Cc: Jonathan Corbet +Cc: linux-doc@vger.kernel.org +Link: https://lore.kernel.org/r/20250624080641.509959-6-jirislaby@kernel.org +Signed-off-by: Greg Kroah-Hartman +--- + Documentation/driver-api/tty/tty_port.rst | 5 +++-- + drivers/tty/tty_port.c | 5 ----- + include/linux/tty_port.h | 9 +++++++++ + 3 files changed, 12 insertions(+), 7 deletions(-) + +--- a/Documentation/driver-api/tty/tty_port.rst ++++ b/Documentation/driver-api/tty/tty_port.rst +@@ -42,9 +42,10 @@ TTY Refcounting + TTY Helpers + ----------- + ++.. kernel-doc:: include/linux/tty_port.h ++ :identifiers: tty_port_tty_hangup tty_port_tty_vhangup + .. kernel-doc:: drivers/tty/tty_port.c +- :identifiers: tty_port_tty_hangup tty_port_tty_wakeup +- ++ :identifiers: tty_port_tty_wakeup + + Modem Signals + ------------- +--- a/drivers/tty/tty_port.c ++++ b/drivers/tty/tty_port.c +@@ -411,11 +411,6 @@ void tty_port_hangup(struct tty_port *po + } + EXPORT_SYMBOL(tty_port_hangup); + +-/** +- * tty_port_tty_hangup - helper to hang up a tty +- * @port: tty port +- * @check_clocal: hang only ttys with %CLOCAL unset? +- */ + void __tty_port_tty_hangup(struct tty_port *port, bool check_clocal, bool async) + { + struct tty_struct *tty = tty_port_tty_get(port); +--- a/include/linux/tty_port.h ++++ b/include/linux/tty_port.h +@@ -253,11 +253,20 @@ static inline int tty_port_users(struct + return port->count + port->blocked_open; + } + ++/** ++ * tty_port_tty_hangup - helper to hang up a tty asynchronously ++ * @port: tty port ++ * @check_clocal: hang only ttys with %CLOCAL unset? ++ */ + static inline void tty_port_tty_hangup(struct tty_port *port, bool check_clocal) + { + __tty_port_tty_hangup(port, check_clocal, true); + } + ++/** ++ * tty_port_tty_vhangup - helper to hang up a tty synchronously ++ * @port: tty port ++ */ + static inline void tty_port_tty_vhangup(struct tty_port *port) + { + __tty_port_tty_hangup(port, false, false);