]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
5.15-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 27 Oct 2025 11:54:12 +0000 (12:54 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 27 Oct 2025 11:54:12 +0000 (12:54 +0100)
added patches:
net-rtnetlink-fix-module-reference-count-leak-issue-in-rtnetlink_rcv_msg.patch
pci-rcar-demote-warn-to-dev_warn_ratelimited-in-rcar_pcie_wakeup.patch
risc-v-don-t-fail-in-riscv_of_parent_hartid-for-disabled-harts.patch

queue-5.15/net-rtnetlink-fix-module-reference-count-leak-issue-in-rtnetlink_rcv_msg.patch [new file with mode: 0644]
queue-5.15/pci-rcar-demote-warn-to-dev_warn_ratelimited-in-rcar_pcie_wakeup.patch [new file with mode: 0644]
queue-5.15/risc-v-don-t-fail-in-riscv_of_parent_hartid-for-disabled-harts.patch [new file with mode: 0644]
queue-5.15/series

diff --git a/queue-5.15/net-rtnetlink-fix-module-reference-count-leak-issue-in-rtnetlink_rcv_msg.patch b/queue-5.15/net-rtnetlink-fix-module-reference-count-leak-issue-in-rtnetlink_rcv_msg.patch
new file mode 100644 (file)
index 0000000..3389031
--- /dev/null
@@ -0,0 +1,33 @@
+From 5b22f62724a0a09e00d301abf5b57b0c12be8a16 Mon Sep 17 00:00:00 2001
+From: Zhengchao Shao <shaozhengchao@huawei.com>
+Date: Mon, 15 Aug 2022 10:46:29 +0800
+Subject: net: rtnetlink: fix module reference count leak issue in rtnetlink_rcv_msg
+
+From: Zhengchao Shao <shaozhengchao@huawei.com>
+
+commit 5b22f62724a0a09e00d301abf5b57b0c12be8a16 upstream.
+
+When bulk delete command is received in the rtnetlink_rcv_msg function,
+if bulk delete is not supported, module_put is not called to release
+the reference counting. As a result, module reference count is leaked.
+
+Fixes: a6cec0bcd342 ("net: rtnetlink: add bulk delete support flag")
+Signed-off-by: Zhengchao Shao <shaozhengchao@huawei.com>
+Acked-by: Nikolay Aleksandrov <razor@blackwall.org>
+Link: https://lore.kernel.org/r/20220815024629.240367-1-shaozhengchao@huawei.com
+Signed-off-by: Jakub Kicinski <kuba@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ net/core/rtnetlink.c |    1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/net/core/rtnetlink.c
++++ b/net/core/rtnetlink.c
+@@ -5664,6 +5664,7 @@ static int rtnetlink_rcv_msg(struct sk_b
+       if (kind == RTNL_KIND_DEL && (nlh->nlmsg_flags & NLM_F_BULK) &&
+           !(flags & RTNL_FLAG_BULK_DEL_SUPPORTED)) {
+               NL_SET_ERR_MSG(extack, "Bulk delete is not supported");
++              module_put(owner);
+               goto err_unlock;
+       }
diff --git a/queue-5.15/pci-rcar-demote-warn-to-dev_warn_ratelimited-in-rcar_pcie_wakeup.patch b/queue-5.15/pci-rcar-demote-warn-to-dev_warn_ratelimited-in-rcar_pcie_wakeup.patch
new file mode 100644 (file)
index 0000000..0f5ad23
--- /dev/null
@@ -0,0 +1,71 @@
+From c93637e6a4c4e1d0e85ef7efac78d066bbb24d96 Mon Sep 17 00:00:00 2001
+From: Marek Vasut <marek.vasut+renesas@mailbox.org>
+Date: Sun, 12 May 2024 01:54:50 +0200
+Subject: PCI: rcar: Demote WARN() to dev_warn_ratelimited() in rcar_pcie_wakeup()
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+From: Marek Vasut <marek.vasut+renesas@mailbox.org>
+
+commit c93637e6a4c4e1d0e85ef7efac78d066bbb24d96 upstream.
+
+Avoid large backtrace, it is sufficient to warn the user that there has
+been a link problem. Either the link has failed and the system is in need
+of maintenance, or the link continues to work and user has been informed.
+The message from the warning can be looked up in the sources.
+
+This makes an actual link issue less verbose.
+
+First of all, this controller has a limitation in that the controller
+driver has to assist the hardware with transition to L1 link state by
+writing L1IATN to PMCTRL register, the L1 and L0 link state switching
+is not fully automatic on this controller.
+
+In case of an ASMedia ASM1062 PCIe SATA controller which does not support
+ASPM, on entry to suspend or during platform pm_test, the SATA controller
+enters D3hot state and the link enters L1 state. If the SATA controller
+wakes up before rcar_pcie_wakeup() was called and returns to D0, the link
+returns to L0 before the controller driver even started its transition to
+L1 link state. At this point, the SATA controller did send an PM_ENTER_L1
+DLLP to the PCIe controller and the PCIe controller received it, and the
+PCIe controller did set PMSR PMEL1RX bit.
+
+Once rcar_pcie_wakeup() is called, if the link is already back in L0 state
+and PMEL1RX bit is set, the controller driver has no way to determine if
+it should perform the link transition to L1 state, or treat the link as if
+it is in L0 state. Currently the driver attempts to perform the transition
+to L1 link state unconditionally, which in this specific case fails with a
+PMSR L1FAEG poll timeout, however the link still works as it is already
+back in L0 state.
+
+Reduce this warning verbosity. In case the link is really broken, the
+rcar_pcie_config_access() would fail, otherwise it will succeed and any
+system with this controller and ASM1062 can suspend without generating
+a backtrace.
+
+Fixes: 84b576146294 ("PCI: rcar: Finish transition to L1 state in rcar_pcie_config_access()")
+Link: https://lore.kernel.org/linux-pci/20240511235513.77301-1-marek.vasut+renesas@mailbox.org
+Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
+Signed-off-by: Krzysztof WilczyƄski <kwilczynski@kernel.org>
+Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/pci/controller/pcie-rcar-host.c |    6 +++++-
+ 1 file changed, 5 insertions(+), 1 deletion(-)
+
+--- a/drivers/pci/controller/pcie-rcar-host.c
++++ b/drivers/pci/controller/pcie-rcar-host.c
+@@ -87,7 +87,11 @@ static int rcar_pcie_wakeup(struct devic
+               writel(L1IATN, pcie_base + PMCTLR);
+               ret = readl_poll_timeout_atomic(pcie_base + PMSR, val,
+                                               val & L1FAEG, 10, 1000);
+-              WARN(ret, "Timeout waiting for L1 link state, ret=%d\n", ret);
++              if (ret) {
++                      dev_warn_ratelimited(pcie_dev,
++                                           "Timeout waiting for L1 link state, ret=%d\n",
++                                           ret);
++              }
+               writel(L1FAEG | PMEL1RX, pcie_base + PMSR);
+       }
diff --git a/queue-5.15/risc-v-don-t-fail-in-riscv_of_parent_hartid-for-disabled-harts.patch b/queue-5.15/risc-v-don-t-fail-in-riscv_of_parent_hartid-for-disabled-harts.patch
new file mode 100644 (file)
index 0000000..62c00fc
--- /dev/null
@@ -0,0 +1,51 @@
+From c4676f8dc1e12e68d6511f9ed89707fdad4c962c Mon Sep 17 00:00:00 2001
+From: Anup Patel <apatel@ventanamicro.com>
+Date: Fri, 27 Oct 2023 21:12:53 +0530
+Subject: RISC-V: Don't fail in riscv_of_parent_hartid() for disabled HARTs
+
+From: Anup Patel <apatel@ventanamicro.com>
+
+commit c4676f8dc1e12e68d6511f9ed89707fdad4c962c upstream.
+
+The riscv_of_processor_hartid() used by riscv_of_parent_hartid() fails
+for HARTs disabled in the DT. This results in the following warning
+thrown by the RISC-V INTC driver for the E-core on SiFive boards:
+
+[    0.000000] riscv-intc: unable to find hart id for /cpus/cpu@0/interrupt-controller
+
+The riscv_of_parent_hartid() is only expected to read the hartid
+from the DT so we directly call of_get_cpu_hwid() instead of calling
+riscv_of_processor_hartid().
+
+Fixes: ad635e723e17 ("riscv: cpu: Add 64bit hartid support on RV64")
+Signed-off-by: Anup Patel <apatel@ventanamicro.com>
+Reviewed-by: Atish Patra <atishp@rivosinc.com>
+Link: https://lore.kernel.org/r/20231027154254.355853-2-apatel@ventanamicro.com
+Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ arch/riscv/kernel/cpu.c |   11 ++++++-----
+ 1 file changed, 6 insertions(+), 5 deletions(-)
+
+--- a/arch/riscv/kernel/cpu.c
++++ b/arch/riscv/kernel/cpu.c
+@@ -50,13 +50,14 @@ int riscv_of_processor_hartid(struct dev
+  */
+ int riscv_of_parent_hartid(struct device_node *node, unsigned long *hartid)
+ {
+-      int rc;
+-
+       for (; node; node = node->parent) {
+               if (of_device_is_compatible(node, "riscv")) {
+-                      rc = riscv_of_processor_hartid(node, hartid);
+-                      if (!rc)
+-                              return 0;
++                      *hartid = (unsigned long)of_get_cpu_hwid(node, 0);
++                      if (*hartid == ~0UL) {
++                              pr_warn("Found CPU without hart ID\n");
++                              return -ENODEV;
++                      }
++                      return 0;
+               }
+       }
index aff930aa0b5972cfe88df818a33d3b3516ec987e..272dd7b608ee0e72ca88749d19f62ed87270a010 100644 (file)
@@ -118,3 +118,6 @@ usb-gadget-store-endpoint-pointer-in-usb_request.patch
 usb-gadget-introduce-free_usb_request-helper.patch
 usb-gadget-f_ncm-refactor-bind-path-to-use-__free.patch
 usb-gadget-f_acm-refactor-bind-path-to-use-__free.patch
+net-rtnetlink-fix-module-reference-count-leak-issue-in-rtnetlink_rcv_msg.patch
+pci-rcar-demote-warn-to-dev_warn_ratelimited-in-rcar_pcie_wakeup.patch
+risc-v-don-t-fail-in-riscv_of_parent_hartid-for-disabled-harts.patch