]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
6.6-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 9 Jan 2026 10:42:56 +0000 (11:42 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 9 Jan 2026 10:42:56 +0000 (11:42 +0100)
added patches:
blk-mq-setup-queue-tag_set-before-initializing-hctx.patch
tty-fix-tty_port_tty_-hangup-kernel-doc.patch

queue-6.6/blk-mq-setup-queue-tag_set-before-initializing-hctx.patch [new file with mode: 0644]
queue-6.6/series
queue-6.6/tty-fix-tty_port_tty_-hangup-kernel-doc.patch [new file with mode: 0644]

diff --git a/queue-6.6/blk-mq-setup-queue-tag_set-before-initializing-hctx.patch b/queue-6.6/blk-mq-setup-queue-tag_set-before-initializing-hctx.patch
new file mode 100644 (file)
index 0000000..90d0e5f
--- /dev/null
@@ -0,0 +1,55 @@
+From c25c0c9035bb8b28c844dfddeda7b8bdbcfcae95 Mon Sep 17 00:00:00 2001
+From: Ming Lei <ming.lei@redhat.com>
+Date: Mon, 14 Oct 2024 08:51:15 +0800
+Subject: blk-mq: setup queue ->tag_set before initializing hctx
+
+From: Ming Lei <ming.lei@redhat.com>
+
+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 <mr.rickkoch@gmail.com>
+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 <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>
+---
+ block/blk-mq.c |    8 ++++++--
+ 1 file changed, 6 insertions(+), 2 deletions(-)
+
+--- a/block/blk-mq.c
++++ b/block/blk-mq.c
+@@ -4453,6 +4453,12 @@ int blk_mq_init_allocated_queue(struct b
+       /* mark the queue as mq asap */
+       q->mq_ops = set->ops;
++      /*
++       * ->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_exit;
+@@ -4471,8 +4477,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);
index a615131510d901a393e1a877d793e93e08ae52a8..f80c5120768560c6ca1bb0b0129139b75b0d8304 100644 (file)
@@ -731,3 +731,5 @@ virtio_console-fix-order-of-fields-cols-and-rows.patch
 ext4-filesystems-without-casefold-feature-cannot-be-mounted-with-siphash.patch
 net-stmmac-make-sure-that-ptp_rate-is-not-0-before-configuring-est.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.6/tty-fix-tty_port_tty_-hangup-kernel-doc.patch b/queue-6.6/tty-fix-tty_port_tty_-hangup-kernel-doc.patch
new file mode 100644 (file)
index 0000000..edb5572
--- /dev/null
@@ -0,0 +1,81 @@
+From 6241b49540a65a6d5274fa938fd3eb4cbfe2e076 Mon Sep 17 00:00:00 2001
+From: "Jiri Slaby (SUSE)" <jirislaby@kernel.org>
+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) <jirislaby@kernel.org>
+
+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)" <jirislaby@kernel.org>
+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 <ilpo.jarvinen@linux.intel.com>
+Cc: Jonathan Corbet <corbet@lwn.net>
+Cc: linux-doc@vger.kernel.org
+Link: https://lore.kernel.org/r/20250624080641.509959-6-jirislaby@kernel.org
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ 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
+@@ -409,11 +409,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
+@@ -254,11 +254,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);