* [folded-merged] mm-hugetlb_cma-fix-null-nodemask-dereference-in-hugetlb_cma_alloc_frozen_folio-v5.patch removed from -mm tree
@ 2026-08-12 1:44 Andrew Morton
0 siblings, 0 replies; only message in thread
From: Andrew Morton @ 2026-08-12 1:44 UTC (permalink / raw)
To: mm-commits, wangkefeng.wang, usamaarif642, surenb, stable,
shakeel.butt, osalvador, muchun.song, gthelen, fvdl, david,
anshuman.khandual, souravpanda, akpm
The quilt patch titled
Subject: mm-hugetlb_cma-fix-null-nodemask-dereference-in-hugetlb_cma_alloc_frozen_folio-v5
has been removed from the -mm tree. Its filename was
mm-hugetlb_cma-fix-null-nodemask-dereference-in-hugetlb_cma_alloc_frozen_folio-v5.patch
This patch was dropped because it was folded into mm-hugetlb_cma-fix-null-nodemask-dereference-in-hugetlb_cma_alloc_frozen_folio.patch
------------------------------------------------------
From: Sourav Panda <souravpanda@google.com>
Subject: mm-hugetlb_cma-fix-null-nodemask-dereference-in-hugetlb_cma_alloc_frozen_folio-v5
Date: Sun, 9 Aug 2026 04:32:50 +0000
Changes in v5:
- Replaced defaulting nodemask to &node_states[N_MEMORY] with safely reading
cpuset_current_mems_allowed using a seqcount retry loop, ensuring fallback
allocations comply with task hardwall cpusets as suggested by Usama Arif.
Link: https://lore.kernel.org/20260809043250.2917406-1-souravpanda@google.com
Fixes: eb02f14c4a2b ("mm/hugetlb: allow overcommitting gigantic hugepages")
Signed-off-by: Sourav Panda <souravpanda@google.com>
Cc: Anshuman Khandual <anshuman.khandual@arm.com>
Cc: David Hildenbrand <david@kernel.org>
Cc: Frank van der Linden <fvdl@google.com>
Cc: Greg Thelen <gthelen@google.com>
Cc: Kefeng Wang <wangkefeng.wang@huawei.com>
Cc: Muchun Song <muchun.song@linux.dev>
Cc: Oscar Salvador <osalvador@suse.de>
Cc: Shakeel Butt <shakeel.butt@linux.dev>
Cc: Suren Baghdasaryan <surenb@google.com>
Cc: Usama Arif <usamaarif642@gmail.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
mm/hugetlb_cma.c | 14 ++++++++++++--
1 file changed, 12 insertions(+), 2 deletions(-)
--- a/mm/hugetlb_cma.c~mm-hugetlb_cma-fix-null-nodemask-dereference-in-hugetlb_cma_alloc_frozen_folio-v5
+++ a/mm/hugetlb_cma.c
@@ -3,6 +3,7 @@
#include <linux/mm.h>
#include <linux/cma.h>
#include <linux/compiler.h>
+#include <linux/cpuset.h>
#include <linux/mm_inline.h>
#include <asm/page.h>
@@ -30,12 +31,21 @@ struct folio *hugetlb_cma_alloc_frozen_f
int node;
struct folio *folio;
struct page *page = NULL;
+ nodemask_t local_node_mask;
if (!hugetlb_cma_size)
return NULL;
- if (!nodemask)
- nodemask = &node_states[N_MEMORY];
+ if (!nodemask) {
+ unsigned int cpuset_mems_cookie;
+
+ do {
+ cpuset_mems_cookie = read_mems_allowed_begin();
+ local_node_mask = cpuset_current_mems_allowed;
+ } while (read_mems_allowed_retry(cpuset_mems_cookie));
+
+ nodemask = &local_node_mask;
+ }
if (hugetlb_cma[nid] && node_isset(nid, *nodemask))
page = cma_alloc_frozen_compound(hugetlb_cma[nid], order);
_
Patches currently in -mm which might be from souravpanda@google.com are
mm-hugetlb_cma-fix-null-nodemask-dereference-in-hugetlb_cma_alloc_frozen_folio.patch
mm-hugetlb_cma-support-percentage-based-hugetlb_cma-reservation.patch
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2026-08-12 1:44 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-12 1:44 [folded-merged] mm-hugetlb_cma-fix-null-nodemask-dereference-in-hugetlb_cma_alloc_frozen_folio-v5.patch removed from -mm tree Andrew Morton
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.