From: Greg Kroah-Hartman Date: Mon, 24 Mar 2025 20:53:43 +0000 (-0400) Subject: 6.12-stable patches X-Git-Tag: v6.1.132~16 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=d023159f19096d48ff4a3b334a899afade924623;p=thirdparty%2Fkernel%2Fstable-queue.git 6.12-stable patches 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 --- 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 index 0000000000..1248f862ef --- /dev/null +++ b/queue-6.12/arm64-dts-rockchip-fix-u2phy1_host-status-for-nanopi-r4s.patch @@ -0,0 +1,38 @@ +From 38f4aa34a5f737ea8588dac320d884cc2e762c03 Mon Sep 17 00:00:00 2001 +From: Justin Klaassen +Date: Tue, 25 Feb 2025 17:03:58 +0000 +Subject: arm64: dts: rockchip: fix u2phy1_host status for NanoPi R4S + +From: Justin Klaassen + +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 +Reviewed-by: Dragan Simic +Link: https://lore.kernel.org/r/20250225170420.3898-1-justin@tidylabs.net +Signed-off-by: Heiko Stuebner +Signed-off-by: Greg Kroah-Hartman +--- + 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 index 0000000000..45bbdd9c80 --- /dev/null +++ b/queue-6.12/libsubcmd-silence-compiler-warning.patch @@ -0,0 +1,56 @@ +From 7a4ffec9fd54ea27395e24dff726dbf58e2fe06b Mon Sep 17 00:00:00 2001 +From: Eder Zulian +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 + +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 +Signed-off-by: Andrii Nakryiko +Acked-by: Arnaldo Carvalho de Melo +Acked-by: Jiri Olsa +Link: https://lore.kernel.org/bpf/20241022172329.3871958-4-ezulian@redhat.com +Signed-off-by: Bin Lan +Signed-off-by: He Zhe +Signed-off-by: Greg Kroah-Hartman +--- + 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 index 0000000000..1c19efc2aa --- /dev/null +++ b/queue-6.12/mm-huge_memory-drop-beyond-eof-folios-with-the-right-number-of-refs.patch @@ -0,0 +1,53 @@ +From 14efb4793519d73fb2902bb0ece319b886e4b4b9 Mon Sep 17 00:00:00 2001 +From: Zi Yan +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 + +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 +Reported-by: Hugh Dickins +Closes: https://lore.kernel.org/all/fcbadb7f-dd3e-21df-f9a7-2853b53183c4@google.com/ +Cc: Baolin Wang +Cc: David Hildenbrand +Cc: John Hubbard +Cc: Kefeng Wang +Cc: Kirill A. Shuemov +Cc: Luis Chamberalin +Cc: Matthew Wilcow (Oracle) +Cc: Miaohe Lin +Cc: Pankaj Raghav +Cc: Ryan Roberts +Cc: Yang Shi +Cc: Yu Zhao +Cc: +Signed-off-by: Andrew Morton +Signed-off-by: Greg Kroah-Hartman +--- + 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); diff --git a/queue-6.12/series b/queue-6.12/series index 3918994fa3..b804d231f8 100644 --- a/queue-6.12/series +++ b/queue-6.12/series @@ -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