From: Greg Kroah-Hartman Date: Tue, 18 Feb 2025 15:09:27 +0000 (+0100) Subject: 6.1-stable patches X-Git-Tag: v6.1.129~34 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=c4b4a30dc19b49500cc645d40967cdf79253fe6a;p=thirdparty%2Fkernel%2Fstable-queue.git 6.1-stable patches added patches: arm64-tegra-fix-typo-in-tegra234-dce-fabric-compatible.patch mm-gup-fix-infinite-loop-within-__get_longterm_locked.patch --- diff --git a/queue-6.1/arm64-tegra-fix-typo-in-tegra234-dce-fabric-compatible.patch b/queue-6.1/arm64-tegra-fix-typo-in-tegra234-dce-fabric-compatible.patch new file mode 100644 index 0000000000..d0b2241bea --- /dev/null +++ b/queue-6.1/arm64-tegra-fix-typo-in-tegra234-dce-fabric-compatible.patch @@ -0,0 +1,42 @@ +From 604120fd9e9df50ee0e803d3c6e77a1f45d2c58e Mon Sep 17 00:00:00 2001 +From: Sumit Gupta +Date: Wed, 18 Dec 2024 00:07:36 +0000 +Subject: arm64: tegra: Fix typo in Tegra234 dce-fabric compatible + +From: Sumit Gupta + +commit 604120fd9e9df50ee0e803d3c6e77a1f45d2c58e upstream. + +The compatible string for the Tegra DCE fabric is currently defined as +'nvidia,tegra234-sce-fabric' but this is incorrect because this is the +compatible string for SCE fabric. Update the compatible for the DCE +fabric to correct the compatible string. + +This compatible needs to be correct in order for the interconnect +to catch things such as improper data accesses. + +Cc: stable@vger.kernel.org +Fixes: 302e154000ec ("arm64: tegra: Add node for CBB 2.0 on Tegra234") +Signed-off-by: Sumit Gupta +Signed-off-by: Ivy Huang +Reviewed-by: Brad Griffis +Reviewed-by: Jon Hunter +Link: https://lore.kernel.org/r/20241218000737.1789569-2-yijuh@nvidia.com +Signed-off-by: Thierry Reding +Signed-off-by: Brad Griffis +Signed-off-by: Greg Kroah-Hartman +--- + arch/arm64/boot/dts/nvidia/tegra234.dtsi | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/arch/arm64/boot/dts/nvidia/tegra234.dtsi ++++ b/arch/arm64/boot/dts/nvidia/tegra234.dtsi +@@ -1558,7 +1558,7 @@ + }; + + dce-fabric@de00000 { +- compatible = "nvidia,tegra234-sce-fabric"; ++ compatible = "nvidia,tegra234-dce-fabric"; + reg = <0xde00000 0x40000>; + interrupts = ; + status = "okay"; diff --git a/queue-6.1/mm-gup-fix-infinite-loop-within-__get_longterm_locked.patch b/queue-6.1/mm-gup-fix-infinite-loop-within-__get_longterm_locked.patch new file mode 100644 index 0000000000..64cb3d6ff0 --- /dev/null +++ b/queue-6.1/mm-gup-fix-infinite-loop-within-__get_longterm_locked.patch @@ -0,0 +1,90 @@ +From 1aaf8c122918aa8897605a9aa1e8ed6600d6f930 Mon Sep 17 00:00:00 2001 +From: Zhaoyang Huang +Date: Tue, 21 Jan 2025 10:01:59 +0800 +Subject: mm: gup: fix infinite loop within __get_longterm_locked + +From: Zhaoyang Huang + +commit 1aaf8c122918aa8897605a9aa1e8ed6600d6f930 upstream. + +We can run into an infinite loop in __get_longterm_locked() when +collect_longterm_unpinnable_folios() finds only folios that are isolated +from the LRU or were never added to the LRU. This can happen when all +folios to be pinned are never added to the LRU, for example when +vm_ops->fault allocated pages using cma_alloc() and never added them to +the LRU. + +Fix it by simply taking a look at the list in the single caller, to see if +anything was added. + +[zhaoyang.huang@unisoc.com: move definition of local] + Link: https://lkml.kernel.org/r/20250122012604.3654667-1-zhaoyang.huang@unisoc.com +Link: https://lkml.kernel.org/r/20250121020159.3636477-1-zhaoyang.huang@unisoc.com +Fixes: 67e139b02d99 ("mm/gup.c: refactor check_and_migrate_movable_pages()") +Signed-off-by: Zhaoyang Huang +Reviewed-by: John Hubbard +Reviewed-by: David Hildenbrand +Suggested-by: David Hildenbrand +Acked-by: David Hildenbrand +Cc: Aijun Sun +Cc: Alistair Popple +Cc: +Signed-off-by: Andrew Morton +Signed-off-by: Wentao Guan +Signed-off-by: Greg Kroah-Hartman +--- + mm/gup.c | 14 ++++---------- + 1 file changed, 4 insertions(+), 10 deletions(-) + +--- a/mm/gup.c ++++ b/mm/gup.c +@@ -1944,14 +1944,14 @@ struct page *get_dump_page(unsigned long + /* + * Returns the number of collected pages. Return value is always >= 0. + */ +-static unsigned long collect_longterm_unpinnable_pages( ++static void collect_longterm_unpinnable_pages( + struct list_head *movable_page_list, + unsigned long nr_pages, + struct page **pages) + { +- unsigned long i, collected = 0; + struct folio *prev_folio = NULL; + bool drain_allow = true; ++ unsigned long i; + + for (i = 0; i < nr_pages; i++) { + struct folio *folio = page_folio(pages[i]); +@@ -1963,8 +1963,6 @@ static unsigned long collect_longterm_un + if (folio_is_longterm_pinnable(folio)) + continue; + +- collected++; +- + if (folio_is_device_coherent(folio)) + continue; + +@@ -1986,8 +1984,6 @@ static unsigned long collect_longterm_un + NR_ISOLATED_ANON + folio_is_file_lru(folio), + folio_nr_pages(folio)); + } +- +- return collected; + } + + /* +@@ -2080,12 +2076,10 @@ err: + static long check_and_migrate_movable_pages(unsigned long nr_pages, + struct page **pages) + { +- unsigned long collected; + LIST_HEAD(movable_page_list); + +- collected = collect_longterm_unpinnable_pages(&movable_page_list, +- nr_pages, pages); +- if (!collected) ++ collect_longterm_unpinnable_pages(&movable_page_list, nr_pages, pages); ++ if (list_empty(&movable_page_list)) + return 0; + + return migrate_longterm_unpinnable_pages(&movable_page_list, nr_pages, diff --git a/queue-6.1/series b/queue-6.1/series index bc439e5a03..7c77d9e808 100644 --- a/queue-6.1/series +++ b/queue-6.1/series @@ -559,3 +559,5 @@ drm-v3d-stop-active-perfmon-if-it-is-being-destroyed.patch kdb-do-not-assume-write-callback-available.patch x86-static-call-remove-early_boot_irqs_disabled-check-to-fix-xen-pvh-dom0.patch iommu-return-right-value-in-iommu_sva_bind_device.patch +arm64-tegra-fix-typo-in-tegra234-dce-fabric-compatible.patch +mm-gup-fix-infinite-loop-within-__get_longterm_locked.patch