]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
6.12-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 10 Dec 2024 10:25:55 +0000 (11:25 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 10 Dec 2024 10:25:55 +0000 (11:25 +0100)
added patches:
memblock-allow-zero-threshold-in-validate_numa_converage.patch

queue-6.12/memblock-allow-zero-threshold-in-validate_numa_converage.patch [new file with mode: 0644]
queue-6.12/series

diff --git a/queue-6.12/memblock-allow-zero-threshold-in-validate_numa_converage.patch b/queue-6.12/memblock-allow-zero-threshold-in-validate_numa_converage.patch
new file mode 100644 (file)
index 0000000..7862ca3
--- /dev/null
@@ -0,0 +1,42 @@
+From 9cdc6423acb49055efb444ecd895d853a70ef931 Mon Sep 17 00:00:00 2001
+From: "Mike Rapoport (Microsoft)" <rppt@kernel.org>
+Date: Fri, 29 Nov 2024 11:13:47 +0200
+Subject: memblock: allow zero threshold in validate_numa_converage()
+
+From: Mike Rapoport (Microsoft) <rppt@kernel.org>
+
+commit 9cdc6423acb49055efb444ecd895d853a70ef931 upstream.
+
+Currently memblock validate_numa_converage() returns false negative when
+threshold set to zero.
+
+Make the check if the memory size with invalid node ID is greater than
+the threshold exclusive to fix that.
+
+Link: https://lore.kernel.org/all/Z0mIDBD4KLyxyOCm@kernel.org/
+Signed-off-by: Mike Rapoport (Microsoft) <rppt@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ mm/memblock.c |    4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+--- a/mm/memblock.c
++++ b/mm/memblock.c
+@@ -735,7 +735,7 @@ int __init_memblock memblock_add(phys_ad
+ /**
+  * memblock_validate_numa_coverage - check if amount of memory with
+  * no node ID assigned is less than a threshold
+- * @threshold_bytes: maximal number of pages that can have unassigned node
++ * @threshold_bytes: maximal memory size that can have unassigned node
+  * ID (in bytes).
+  *
+  * A buggy firmware may report memory that does not belong to any node.
+@@ -755,7 +755,7 @@ bool __init_memblock memblock_validate_n
+                       nr_pages += end_pfn - start_pfn;
+       }
+-      if ((nr_pages << PAGE_SHIFT) >= threshold_bytes) {
++      if ((nr_pages << PAGE_SHIFT) > threshold_bytes) {
+               mem_size_mb = memblock_phys_mem_size() >> 20;
+               pr_err("NUMA: no nodes coverage for %luMB of %luMB RAM\n",
+                      (nr_pages << PAGE_SHIFT) >> 20, mem_size_mb);
index 04e9103c49b0f2bbe457d030875307b08252fcd3..cc3dce141e4bc636b47a7c1caa716d8631c1c1d6 100644 (file)
@@ -216,3 +216,4 @@ mm-open-code-page_folio-in-dump_page.patch
 mm-fix-vrealloc-s-kasan-poisoning-logic.patch
 mm-respect-mmap-hint-address-when-aligning-for-thp.patch
 scsi-ufs-pltfrm-drop-pm-runtime-reference-count-after-ufshcd_remove.patch
+memblock-allow-zero-threshold-in-validate_numa_converage.patch