All of lore.kernel.org
 help / color / mirror / Atom feed
* [merged mm-stable] mm-vmalloc-use-kmalloc_array-instead-of-kmalloc.patch removed from -mm tree
@ 2025-11-17  1:33 Andrew Morton
  0 siblings, 0 replies; only message in thread
From: Andrew Morton @ 2025-11-17  1:33 UTC (permalink / raw)
  To: mm-commits, vishal.moola, urezki, khalid, david.hunter.linux,
	mehdi.benhadjkhelifa, akpm


The quilt patch titled
     Subject: mm/vmalloc: use kmalloc_array() instead of kmalloc()
has been removed from the -mm tree.  Its filename was
     mm-vmalloc-use-kmalloc_array-instead-of-kmalloc.patch

This patch was dropped because it was merged into the mm-stable branch
of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm

------------------------------------------------------
From: Mehdi Ben Hadj Khelifa <mehdi.benhadjkhelifa@gmail.com>
Subject: mm/vmalloc: use kmalloc_array() instead of kmalloc()
Date: Sat, 18 Oct 2025 21:11:48 +0100

The number of NUMA nodes (nr_node_ids) is bounded, so overflow is not a
practical concern here.  However, using kmalloc_array() better reflects
the intent to allocate an array of unsigned ints, and improves consistency
with other NUMA-related allocations.

No functional change intended.

Link: https://lkml.kernel.org/r/20251018201207.27441-1-mehdi.benhadjkhelifa@gmail.com
Signed-off-by: Mehdi Ben Hadj Khelifa <mehdi.benhadjkhelifa@gmail.com>
Reviewed-by: Uladzislau Rezki (Sony) <urezki@gmail.com>
Reviewed-by: Vishal Moola (Oracle) <vishal.moola@gmail.com>
Reviewed-by: Khalid Aziz <khalid@kernel.org>
Cc: David Hunter <david.hunter.linux@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 mm/vmalloc.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/mm/vmalloc.c~mm-vmalloc-use-kmalloc_array-instead-of-kmalloc
+++ a/mm/vmalloc.c
@@ -5140,7 +5140,7 @@ static int vmalloc_info_show(struct seq_
 	unsigned int *counters;
 
 	if (IS_ENABLED(CONFIG_NUMA))
-		counters = kmalloc(nr_node_ids * sizeof(unsigned int), GFP_KERNEL);
+		counters = kmalloc_array(nr_node_ids, sizeof(unsigned int), GFP_KERNEL);
 
 	for_each_vmap_node(vn) {
 		spin_lock(&vn->busy.lock);
_

Patches currently in -mm which might be from mehdi.benhadjkhelifa@gmail.com are

selftests-mm-uffd-remove-static-address-usage-in-shmem_allocate_area.patch
selftests-mm-uffd-remove-static-address-usage-in-shmem_allocate_area-v2.patch


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2025-11-17  1:33 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-11-17  1:33 [merged mm-stable] mm-vmalloc-use-kmalloc_array-instead-of-kmalloc.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.