]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
6.12-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 24 Mar 2025 20:53:43 +0000 (16:53 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 24 Mar 2025 20:53:43 +0000 (16:53 -0400)
added patches:
arm64-dts-rockchip-fix-u2phy1_host-status-for-nanopi-r4s.patch
libsubcmd-silence-compiler-warning.patch
mm-huge_memory-drop-beyond-eof-folios-with-the-right-number-of-refs.patch

queue-6.12/arm64-dts-rockchip-fix-u2phy1_host-status-for-nanopi-r4s.patch [new file with mode: 0644]
queue-6.12/libsubcmd-silence-compiler-warning.patch [new file with mode: 0644]
queue-6.12/mm-huge_memory-drop-beyond-eof-folios-with-the-right-number-of-refs.patch [new file with mode: 0644]
queue-6.12/series

diff --git a/queue-6.12/arm64-dts-rockchip-fix-u2phy1_host-status-for-nanopi-r4s.patch b/queue-6.12/arm64-dts-rockchip-fix-u2phy1_host-status-for-nanopi-r4s.patch
new file mode 100644 (file)
index 0000000..1248f86
--- /dev/null
@@ -0,0 +1,38 @@
+From 38f4aa34a5f737ea8588dac320d884cc2e762c03 Mon Sep 17 00:00:00 2001
+From: Justin Klaassen <justin@tidylabs.net>
+Date: Tue, 25 Feb 2025 17:03:58 +0000
+Subject: arm64: dts: rockchip: fix u2phy1_host status for NanoPi R4S
+
+From: Justin Klaassen <justin@tidylabs.net>
+
+commit 38f4aa34a5f737ea8588dac320d884cc2e762c03 upstream.
+
+The u2phy1_host should always have the same status as usb_host1_ehci
+and usb_host1_ohci, otherwise the EHCI and OHCI drivers may be
+initialized for a disabled usb port.
+
+Per the NanoPi R4S schematic, the phy-supply for u2phy1_host is set to
+the vdd_5v regulator.
+
+Fixes: db792e9adbf8 ("rockchip: rk3399: Add support for FriendlyARM NanoPi R4S")
+Cc: stable@vger.kernel.org
+Signed-off-by: Justin Klaassen <justin@tidylabs.net>
+Reviewed-by: Dragan Simic <dsimic@manjaro.org>
+Link: https://lore.kernel.org/r/20250225170420.3898-1-justin@tidylabs.net
+Signed-off-by: Heiko Stuebner <heiko@sntech.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ arch/arm64/boot/dts/rockchip/rk3399-nanopi-r4s.dts |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/arch/arm64/boot/dts/rockchip/rk3399-nanopi-r4s.dts
++++ b/arch/arm64/boot/dts/rockchip/rk3399-nanopi-r4s.dts
+@@ -117,7 +117,7 @@
+ };
+ &u2phy1_host {
+-      status = "disabled";
++      phy-supply = <&vdd_5v>;
+ };
+ &uart0 {
diff --git a/queue-6.12/libsubcmd-silence-compiler-warning.patch b/queue-6.12/libsubcmd-silence-compiler-warning.patch
new file mode 100644 (file)
index 0000000..45bbdd9
--- /dev/null
@@ -0,0 +1,56 @@
+From 7a4ffec9fd54ea27395e24dff726dbf58e2fe06b Mon Sep 17 00:00:00 2001
+From: Eder Zulian <ezulian@redhat.com>
+Date: Tue, 22 Oct 2024 19:23:29 +0200
+Subject: libsubcmd: Silence compiler warning
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+From: Eder Zulian <ezulian@redhat.com>
+
+commit 7a4ffec9fd54ea27395e24dff726dbf58e2fe06b upstream.
+
+Initialize the pointer 'o' in options__order to NULL to prevent a
+compiler warning/error which is observed when compiling with the '-Og'
+option, but is not emitted by the compiler with the current default
+compilation options.
+
+For example, when compiling libsubcmd with
+
+ $ make "EXTRA_CFLAGS=-Og" -C tools/lib/subcmd/ clean all
+
+Clang version 17.0.6 and GCC 13.3.1 fail to compile parse-options.c due
+to following error:
+
+  parse-options.c: In function ‘options__order’:
+  parse-options.c:832:9: error: ‘o’ may be used uninitialized [-Werror=maybe-uninitialized]
+    832 |         memcpy(&ordered[nr_opts], o, sizeof(*o));
+        |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+  parse-options.c:810:30: note: ‘o’ was declared here
+    810 |         const struct option *o, *p = opts;
+        |                              ^
+  cc1: all warnings being treated as errors
+
+Signed-off-by: Eder Zulian <ezulian@redhat.com>
+Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
+Acked-by: Arnaldo Carvalho de Melo <acme@redhat.com>
+Acked-by: Jiri Olsa <jolsa@kernel.org>
+Link: https://lore.kernel.org/bpf/20241022172329.3871958-4-ezulian@redhat.com
+Signed-off-by: Bin Lan <bin.lan.cn@windriver.com>
+Signed-off-by: He Zhe <zhe.he@windriver.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ tools/lib/subcmd/parse-options.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/tools/lib/subcmd/parse-options.c
++++ b/tools/lib/subcmd/parse-options.c
+@@ -807,7 +807,7 @@ static int option__cmp(const void *va, c
+ static struct option *options__order(const struct option *opts)
+ {
+       int nr_opts = 0, nr_group = 0, nr_parent = 0, len;
+-      const struct option *o, *p = opts;
++      const struct option *o = NULL, *p = opts;
+       struct option *opt, *ordered = NULL, *group;
+       /* flatten the options that have parents */
diff --git a/queue-6.12/mm-huge_memory-drop-beyond-eof-folios-with-the-right-number-of-refs.patch b/queue-6.12/mm-huge_memory-drop-beyond-eof-folios-with-the-right-number-of-refs.patch
new file mode 100644 (file)
index 0000000..1c19efc
--- /dev/null
@@ -0,0 +1,53 @@
+From 14efb4793519d73fb2902bb0ece319b886e4b4b9 Mon Sep 17 00:00:00 2001
+From: Zi Yan <ziy@nvidia.com>
+Date: Mon, 10 Mar 2025 11:57:27 -0400
+Subject: mm/huge_memory: drop beyond-EOF folios with the right number of refs
+
+From: Zi Yan <ziy@nvidia.com>
+
+commit 14efb4793519d73fb2902bb0ece319b886e4b4b9 upstream.
+
+When an after-split folio is large and needs to be dropped due to EOF,
+folio_put_refs(folio, folio_nr_pages(folio)) should be used to drop all
+page cache refs.  Otherwise, the folio will not be freed, causing memory
+leak.
+
+This leak would happen on a filesystem with blocksize > page_size and a
+truncate is performed, where the blocksize makes folios split to >0 order
+ones, causing truncated folios not being freed.
+
+Link: https://lkml.kernel.org/r/20250310155727.472846-1-ziy@nvidia.com
+Fixes: c010d47f107f ("mm: thp: split huge page to any lower order pages")
+Signed-off-by: Zi Yan <ziy@nvidia.com>
+Reported-by: Hugh Dickins <hughd@google.com>
+Closes: https://lore.kernel.org/all/fcbadb7f-dd3e-21df-f9a7-2853b53183c4@google.com/
+Cc: Baolin Wang <baolin.wang@linux.alibaba.com>
+Cc: David Hildenbrand <david@redhat.com>
+Cc: John Hubbard <jhubbard@nvidia.com>
+Cc: Kefeng Wang <wangkefeng.wang@huawei.com>
+Cc: Kirill A. Shuemov <kirill.shutemov@linux.intel.com>
+Cc: Luis Chamberalin <mcgrof@kernel.org>
+Cc: Matthew Wilcow (Oracle) <willy@infradead.org>
+Cc: Miaohe Lin <linmiaohe@huawei.com>
+Cc: Pankaj Raghav <p.raghav@samsung.com>
+Cc: Ryan Roberts <ryan.roberts@arm.com>
+Cc: Yang Shi <yang@os.amperecomputing.com>
+Cc: Yu Zhao <yuzhao@google.com>
+Cc: <stable@vger.kernel.org>
+Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ mm/huge_memory.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/mm/huge_memory.c
++++ b/mm/huge_memory.c
+@@ -3224,7 +3224,7 @@ static void __split_huge_page(struct pag
+                               folio_account_cleaned(tail,
+                                       inode_to_wb(folio->mapping->host));
+                       __filemap_remove_folio(tail, NULL);
+-                      folio_put(tail);
++                      folio_put_refs(tail, folio_nr_pages(tail));
+               } else if (!PageAnon(page)) {
+                       __xa_store(&folio->mapping->i_pages, head[i].index,
+                                       head + i, 0);
index 3918994fa3d44e5c5e7044df865eb99e13d1b1f0..b804d231f8344c5f3a83442dbc4df1988d871267 100644 (file)
@@ -110,3 +110,6 @@ kvm-arm64-refactor-exit-handlers.patch
 kvm-arm64-mark-some-header-functions-as-inline.patch
 kvm-arm64-eagerly-switch-zcr_el-1-2.patch
 revert-sched-core-reduce-cost-of-sched_move_task-when-config-autogroup.patch
+libsubcmd-silence-compiler-warning.patch
+arm64-dts-rockchip-fix-u2phy1_host-status-for-nanopi-r4s.patch
+mm-huge_memory-drop-beyond-eof-folios-with-the-right-number-of-refs.patch